parameter queries

fordy

Registered User.
Local time
Today, 19:58
Joined
Mar 12, 2002
Messages
36
I have a report with many queries in. I want to set them to paremeters, so the user can simply specify what they want once. e.g show me all records of children over [how old] - say ten. However it asks me to specify the age for each one. Is there anyway to link parameter queries. Sorry if this seems confusing
 
Use a form to set the parameter you want. Create an unbound form with an unbound textbox and instead of immediately running the report, open the form with the txtbox. In the queries with the parameter, set the criteria to =[Forms]![NameofForm]![NameofTextbox] and they will 'plug in' the value you have typed in the textbox.

Open the reports with a button - use the wizard to create the button. If you have to open many reports, look at the code and copy the docmd.openreport etc.. and change the "NameOfReport" to each individual report.

Before the End Sub of the on_click code of the button, enter the code DoCmd.Close, acForm "NameOfYourForm" and this will ren the reports and close the form.

HTH
 
thanks it worked well
 

Users who are viewing this thread

Back
Top Bottom