display reports with parameter form

B

bpolite

I have a main report whick is linked to 5 subreports by a field call "Job
Number". Since there are many different job numbers for the reports, I have
designed a query to search the job numbers and created an unbound form with
the control (text box) needed for entering the parameter (job number). I have
modified the query to obtain the parameter from the control on the form. The
form has an OK button that runs the query then sets the form's visible
property to false and a Cancel button that closes the form without running
the query. The issue I'm having is that when I enter the job number into the
form I have to click the OK button 6 times (once for each report) before the
main report and the 5 subreports are displayed. Is there some vba code that I
could use to have the reports displayed with only 1 click of the OK button?
Any help would be greatly appreciated.
 
D

Duane Hookom

I'm not sure what is opening the form. Do you have code in the On Open event
of the report (and subreports) that opens the form? I don't care for this
type of solution but you could check to see if the form is already open but
just invisible. If it is open but invisible, don't try to open it.
 

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