Dynamic query for Report

GregC

Registered User.
Local time
Today, 19:04
Joined
Apr 25, 2003
Messages
17
I have created a dynamic query based on input from a form. Now that I can filter and retreive the proper data, I need to place the info in a report.

How do I tell the report that it's data source is a not from a saved query but from a built SQL query based on the form?

The dynamic query is called from the following code:

CurrentDb.QueryDefs("qryFindCalls").SQL = strSQL
DoCmd.OpenQuery "qryFindCalls", acViewNormal, acReadOnly

How do I call a report based on this?
 
try opening a report which has to been set with qryFindCalls as the RecordSource.
Code:
CurrentDb.QueryDefs("qryFindCalls").SQL = strSQL
DoCmd.OpenForm "YourFormName", acViewPreview
 
Thank you. Seems that I was so caught up in writing this in code that I managed to forget something basic.
 

Users who are viewing this thread

Back
Top Bottom