473,657 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Select a Specific Report to print based on date range

22 New Member
I find myself here again...I am using access 2007 and I have three Reports. What I am thinking I would like to do is have a single list box.combo box? whereby I can select a report and then be able to and or select a date range for that report and then be able to print. I hope this makes sense...

so

select a specific report

Product
Outgoing
Suppliers

enter choose date if applicable

Print that report.


Can this all be done with one or two clicks of the button as I am thinking that this would be simply placed on my main index? your help in the right direction would be appreciated
Jun 18 '10 #1
4 5940
Jerry Maiapu
259 Contributor
@heart01
That is possible.
What you need to do is basically, create a combo box on a unbound form and in the combo box's row source put "Product", "Outgoing", "Suppliers"

Now create two unbound txt boxes for the two date range.
To limit the results on the report (based on the date diff entered on the form) you have to put some criteria on the query where the 3 report are based on.

On the criteria section under your date column in the query you should use this syntax:

Expand|Select|Wrap|Line Numbers
  1. Between Forms![your form name]![name of first text box for date1] And Forms![your form name]![name of second text box for date2] 
Now add a command button on the form and on click event do some validation and use
Expand|Select|Wrap|Line Numbers
  1. DOCmd.OpenReport
to open the report based on condition.
You'll use
Expand|Select|Wrap|Line Numbers
  1. If <condition> Else 
vb conditional statements to make sure correct report is opened.

That is all I think you need to do..

Hope this helps..
Jun 18 '10 #2
NeoPa
32,568 Recognized Expert Moderator MVP
That's mainly good advice. I would only say that filtering is even easier than indicated.

No need to make the query link into the form (which can cause problems if/when it's not open). Instead you can build up the filter string in SQL form before passing this string as the WhereCondition parameter of the DoCmd.OpenRepor t() call.

Similar filtering is covered in Example Filtering on a Form.
Jun 18 '10 #3
heart01
22 New Member
I appreciate your response - I have the date selection happening but have no idea about linking the selection in the combo box to run and execute the report...I get as far as having the selecton choice available but that is ias far as it goes...
Jun 19 '10 #4
NeoPa
32,568 Recognized Expert Moderator MVP
OK. That's fine.

It sounds like you haven't read the linked article yet though. I suggest you go there first then, when you have the concept of building the filter string we can tell you how to apply it to opening a report.

If you get stuck with the string building from the article then come back and explain where you have a difficulty and we can surely clarify.
Jun 19 '10 #5

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

Similar topics

3
7455
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The report prints dental and hygenist appointments for the date (one subreport for each). The user wants to enter a date range and have one page for each date in the date range. I'm wondering how to modify the report. The only way I see is to create...
2
3846
by: Sara | last post by:
I have followed instructions on the http://allenbrowne.com/tips.html for limiting a report to a date range. At the bottom there is a note that says You will end up using this form for all sorts of reports. You may add an option group or list box that selects which report you want printed, and a check box that determines whether the report should be opened in preview mode. I have tried several times to do this but can't figure it out....
0
1442
by: rdemyan via AccessMonster.com | last post by:
I have a need to highlight a date range in a bar chart. If the "highlighting" is accomplished by changing the bar column color for the specific months in the date range, that would be great. Here's an example: I'm plotting meter usage against dates on the chart. The dates are typically the first day of the month. So assume the chart range is 1/1/2000 through 10/31/06, but for the date
19
3916
by: ali3n8 | last post by:
Hello I have attempted to create a date range report from a query called qrycustomerinformation. The field that contains the value of my date is called Followup. When i run a report on this it is fine. But I have decided I would like to pull this report for a specific date range. Ive attempted to use the method on allen brownes page http://allenbrowne.com/casu-08.html. I would like to also mention the followup field also uses this code to...
5
5402
by: jambonjamasb | last post by:
I am wanting to create a report that summarises the number of items within a date range. For example I have a FIELD called System_Change. This is a drop down COMBOBOX that uses words like unix, polfs etc. I know how to query a date range, but not how to count number of fields within this date range. I would like the report to show date range filtered then list all changes and number of times they appear. Thanks in advance anything...
1
1772
by: ken | last post by:
I'm trying to implement Allen Browne's advice from http://allenbrowne.com/casu-08.html. Unfortunately, I'm getting this error: Run-time error '438': Object doesn't support this property or method associated with: strWhere = strField & " Between " & Format(Me.txtStartDate,
3
3258
by: 6afraidbecause789 | last post by:
If able, can someone please help make a Where clause that strings together IDs in a multi-select listbox AND includes a date range. I wasn’t thinking when I used the code below that strings together the IDs of Clients from a multi-select listbox in an unbound text field, txtCriteria, on a form that is used to pick different reports. It appears that I now have so many clients that I’ve reached the 255 character limit in the txtCriteria...
12
3265
smithj14
by: smithj14 | last post by:
I have a form to enter start and end dates then select a worker name to filter a report. This all works fine and when the report is open in preview mode it shows the date range in the txtboxes on the report header, but when I print the report the value for these txtboxes are #Name? Here is the code Date Range Form: Private Sub cmdViewErrorReport_Click() Dim stDocName As String Dim stDocName2 As String Dim stWhere As String...
3
5016
by: Vinda | last post by:
Hi Bytes, Using a previous question as a base Access 2000 Inserting multiple rows based on a date range. I also wanted to insert multiple rows into a table according to a date range supplied by a user (eg txtRDateStart & txtRDateEnd). The script was envisaged to be able to also gather a time and text description that would be repeated within each row. For example: The user would enter... Start Date: 13/03/2010 End Date: 17/03/2010...
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1732
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.