Sql query report -- maybe a stupid question

mlh407

Registered User.
Local time
Yesterday, 16:55
Joined
Jun 24, 2005
Messages
26
I am not sure if this should be in reports or under vba.

I would like to take a sql query, (Select * from table_name where a=1). It might return 5-10 rows.

I would like to have a script, that opens up a report, filters by a query, prints the report, closes the report, and takes you back where you started from without any user intervention.

Can this be done, are there code examples?
 
Use the query as the RecordSource for the report rather than a table. You probably need some user intervention such as a button click to trigger the code to run. In fact, once you've built the report, add a button to a form and the button wizard will guide you through the process.
 

Users who are viewing this thread

Back
Top Bottom