Report Form Help

bacarat

Registered User.
Local time
Today, 15:08
Joined
Mar 27, 2007
Messages
106
Hi,
I have created a form with a series of boxes. Each one is a different criteria. For instance one is a dropdown of Names from a table, The next is a to and from date box. At the bottom of the form I have a Generate Report command button. My question is, is is possible to generate a report or run a query that will take the information from the boxes and enter it into the "criteria" of my query, and if the boxes are left blank then do not use that box as a criteria? I know I may need to use some VB for this just not sure where to start. Any help or streering in the right direction would be great! Thanks!

Attached is a sample of my form with a query and tables to help explain what im trying to do. Thanks.
 

Attachments

Here's your sample modified. You can now search by any of the fields. It will do this:

1. Search by name only

2. Search by city only

3. Search by date range only

4. Search by name and city

5. Search by name, city and date range

6. search for all those dates later than the from date entered (if no TO date is entered)

7. search for all those dates earlier than the TO date entered (if no FROM date is entered)

8. Search by Name and dates

9. search by city and dates

etc. ...
 

Attachments

Great! Thanks, I will study the form to see how you did it. Thanks for the help.
 

Users who are viewing this thread

Back
Top Bottom