create a report using SQL

sts023

Registered User.
Local time
Today, 02:20
Joined
Dec 1, 2010
Messages
40
Hi guys....

I'm new to Access reports, so please be patient if I'm a little indistinct or use the wrong terms.

I have some SQL which creates a recordset.

The data in the recordset will change based on criteria supplied by the User.

I'd like to create a Report which prints that recordset: the data fields will be the same, just the contents will vary.

I can't see any obvious way of defining a Report with a recordset as its input, so unless I've missed something obvious I guess I'd have to create the Report definition in the same SQL code that creates the recordset.

Can anyone point me at an example of generating and executing a report created entirely from SQL, and using a recordset as its data source?

Thanks for any help you can offer....
 
I needed to get moving on this problem, so in good old "skin a cat" mode, I've switched to writing the details to external files, which I then subsequently process in even more VBA.

I'll examine the suggested site with pleasure - more later....
 
Something like this:

http://baldyweb.com/wherecondition.htm

Base the report on the SQL statement (or a query) without any criteria, then pass the criteria to the report when it's being opened via the WHERE argument of the OpenReport command. Substitute OpenForm in the link with OpenReport.
 

Users who are viewing this thread

Back
Top Bottom