Discussion Locked

Creating report dynamically in Access 97

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I am using Access 97.
In Access 97 I am using a form to generate a dynamic query.(Using the Build Event - Code of a Command Button I am writing Visual Basic code to generate the dynamic query from the user input in the text and check boxes on the form).
I am successful in creating a query dynamically, based on user input from a collection of text boxes and check boxes.

Now, I want to generate a report each time this dynamic query is run. Ofcourse, I do want to delete the earlier report generated by this query.

Please let me know how do I do this?

Many Thanks in advance,
Porella.

5 replies

by donq

If your Form is open when you call the report just enter the query name as the reports Record Source property value. That way when the report runs it will call for the query which in turn looks to the Form (Fields) for the user selected data filters.

If your Form is NOT open set the reports Record Source property value to the query name and place a command button on your Form to call the report. That way the form will always be open when the report is called unless you double-click the report name from the Reports tab in the Databasee Window. Then users would need to enter filters one at a time manually (an un-good choice).

This discussion is closed to new replies.