473,508 Members | 4,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending Criteria to a Report

102 New Member
Hi friends

I changes the Territory Combo Box to List Box.
Multi Select = Extended

Now how to pass this criteria to Report.
Report Query is based by selection of
1 Company
1 Region
1 Territory.
Now how to set is for Multi Select Territory.

All are request for help.
Regards
Irshad Ahmed
Nov 8 '18 #1
7 1377
twinnyfo
3,653 Recognized Expert Moderator Specialist
Irshad,

I moved your post to a new thread, as it truly is a new topic.
Nov 8 '18 #2
twinnyfo
3,653 Recognized Expert Moderator Specialist
What you are trying to do is actually built into the call to open a report in Access:

Expand|Select|Wrap|Line Numbers
  1. Call DoCmd.OpenReport(ReportName:="YourReportName", _
  2.                       WhereCondition:="Company = " & Me.cboCompany & _
  3.                              " AND Region = " & Me.cboRegion & _
  4.                              " AND Territory = " & Me.cboTerritory)
Hope this hepps!
Nov 8 '18 #3
NeoPa
32,557 Recognized Expert Moderator MVP
Twinny mentions the possibility of passing the criteria in a call to DoCmd.OpenReport. WhereCondition is one of the possible parameters, and probably the most pertinent for your question. However, it doesn't hurt to know that there is also another called OpenArgs. Literally for passing an argument, or multiple ones within a single string if required, to the Report.
Nov 8 '18 #4
twinnyfo
3,653 Recognized Expert Moderator Specialist
Hey, NeoPa! Thanks for fixing my named argument! Sometimes I just get typing a forget to check these things.

Thanks for keeping me in line!

:-)
Nov 8 '18 #5
NeoPa
32,557 Recognized Expert Moderator MVP
Hey. It's easier than doing all the work you guys do still ;-)
Nov 9 '18 #6
irsmalik
102 New Member
Hello dears .......... this is my sql for Single Selection of Company, Region, Territory, and Territory List Box is set to Multi Select = None

Expand|Select|Wrap|Line Numbers
  1. SELECT Territory.TerritoryName, Territory.RegionID
  2. FROM Territory
  3. WHERE (((Territory.RegionID)=[Forms]![frmFORM002]![Region_Combo2]))
  4. ORDER BY Territory.TerritoryName;
This is working well and my required Territory Data is at Report preview.

I change In Territory List Box Property
Multi Select = Extend

Now even Single Territory is NOT working and Message
"There is No Data for selected Territory".

Where I am making Mistake.. What is the other way.. Seniors are requested for help.

Thanks
Irshad Ahmed
Nov 9 '18 #7
twinnyfo
3,653 Recognized Expert Moderator Specialist
You have to extract the individual values from a List Box in order to use them.

This Thread (Retrieve Values from a Multi-Select Listbox) may be helpful.

Once you create that string, you can use that value to filter your report:

Expand|Select|Wrap|Line Numbers
  1. "Territory IN (" & strValue & ")"
You would use this in conjunction with Post #3 above and the value generated in the linked thread.

Let us know if you require additional assistance on this one.
Nov 9 '18 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
16568
by: Susan Bricker | last post by:
I would like to generate a report (I have the report working already) using MS/ACCESS 2000 and then have the ability to send the report as an email attachment to my colleagues. I have looked...
2
1881
by: Will | last post by:
I am trying to send a report by email using DoCmd.SendObject acSendReport. When I send the report, it sends the report with all the records whereas I only want the report to show one record. I...
2
2205
by: kimberly.shaffer | last post by:
Okay, I can automate sending of multiple emails with records using Groupwise and Access DB. But now what I need to do is send multiple fields associated with one field out automatically and can't...
0
1228
by: Bob Alston | last post by:
I am having trouble on a client PC getting the Office link, to send an access report I am viewing to MS Word. Also I cannot get send to - mail recipient to work either. The command box pops up...
0
1552
by: Bill Nguyen | last post by:
Please forgive me for cross posting. I hope I can get the answer from either NG. I was able to export a CR report to PDF to MAPI (using Outlook client) , but not with HTML format from a .NET...
5
3168
by: Krij | last post by:
Hi! In my access 2000 db I have a form (frmOffer) and a subform (frmSubOffer). make a .pdf file of this report, or even send the report to my diskdrive as a text-file. Anybody that know...
10
4205
by: richard5150 | last post by:
I have created the tables, queries, forms and the reports, everything works great. My question is, how do you set up a way to create an email from the report you generated in Access? BTW - Happy...
0
2944
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
5
9151
AllusiveKitten
by: AllusiveKitten | last post by:
Hi All I was just wondering if it was possible to send a report as the email body. I am wanting to send an automatic email to multiple people which will be personalised with their names etc. ...
2
2176
by: neosam | last post by:
Hi, Could someone tell me if the code i have written has the correct syntax. DoCmd.SendObject acSendReport as acSpreadSheetType , "reportname", , "email@id.com", , , "report", "Pls find...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.