Select date range and additional field for report

gbuckton

Registered User.
Local time
Today, 09:51
Joined
Aug 20, 2008
Messages
38
Hello,

I have borrowed code from a DB example on this site to produce a form where you can select a date range to produce a report. It is working fairly well, however, when I select the dates and click "Open Report", I am prompted to Enter Parameter Value for Part Number and Production Date, which is coming from some extra code in the original sample I used.

I've attached the DB, and if anyone could take a look to tell me how to eliminate that step it would be greatly appreciated. I am new to reports and VBA script!

As well, I would like to include an additional step where the user can produce a report based on the date range AND another field such as SpeciesName or Location.

Is there a simple way to accomplish this?

thanks!
G
 

Attachments

It comes from the Sorting and Grouping setup.
 
Thanks pbaldy,

I have fixed the issue in the Sorting and Grouping setup.

What would be the best way to 'filter' my reports so one can select to output info on a specific field, eg. Species = Blue Jay?

I'd like to have a dropdown for Species, and, if possible, an additional drop down to select Location.

thanks!
G
 
If they are required choices, you can simply have the query refer to the form control containing the selection. If they are optional, depending on how many there are, you can do this:

http://www.mvps.org/access/queries/qry0001.htm

or build a wherecondition to use with OpenReport.
 
thanks again for the response pbaldy.

I'm a bit confused as to what exactly is 'mycontrol' in this code:

Code:
[Forms]![myForm]![myControl] OR [Forms]![myForm]![myControl] Is Null

I plan to have a dropdown list or combo box called 'Species'.

The first, and default, value would be 'All', and then the rest would be listed eg. Blue Jay, Cardinal, etc.

Is the combo box what is referred to as the 'myControl'?

thanks!
 
Yes; myForm would be the name of your form, myControl the name of your control.
 

Users who are viewing this thread

Back
Top Bottom