running report based on results of QBF

S

Scott

Hi,
I have a form that is used to collect parameters for a query (QBF). The form
works fine but how to do I pass the results to a report? I tried using the
report wizard and based te report on the query but instead of using my form
to enter the parameters, several input boxes are displayed prompting the user
for the parameters.

Thanks,
 
P

PC Datasheet

Leave the record source of the report blank.

Put the following code in the Open event of the report:
DoCmd.OpenForm "NameOfParameterForm",,,,,acDialog
Me.Recordsource = "NameOfQuery"
DoCmd.Close acForm, "NameOfParameterForm"

Create a button on your parameter form and put the following code in the
Click event of the button:
Me.Visible = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top