Creating a query in macro

chadb

Registered User.
Local time
Yesterday, 23:13
Joined
Dec 13, 2005
Messages
18
I need some help. I am using access 2003. I have a table, form, and report. I am trying to customize the report so that users can enter in criteria and only print that data, rather than all of it.

I assume I need a form that the user enters the criteria, which then it creates the query and then opens the report based on that query. How do I create the query in the macro?

For example, they put in a date range of "12/1/2005 - 12/10/2005", and a client name of "Chad". The table is named "main", the date field is named "edate", and client name field is "clientname". The report name is "report_main".

If someone could tell me how and/or provide exact script that would help immensly! I can then build off of that and create more extensive filter criteria.

Your help will be very appreciated! I've searched the forums but can't seem to find an example of what I'm looking for (or understand).
 
Really you create the form, have a regular query access the form fields in it's criteria, and base the report on that query. All your macro has to do is open the report (given the form is already open).
 

Users who are viewing this thread

Back
Top Bottom