Filling out one parameter, selecting multiple queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

How can I, using one parameter (for example weeknumber) letting this
parameter be the base for two or three queries? Now I must enter the same
parameter two or three times. I'm a wizard user, so please no VB solution,
except cut and paste :)

Thank you !

Paul
 
You can refer to a text box on a form.

In the Criteria row of your query, under the appropriate field, enter
something like this:
[Forms].[MyForm].[txtWeekNumber]

Provided the form is open, and there is a suitable entry in the text box,
all the queries will read the value from the form.

If you wish to make this watertight then:
1. Set the Format property of the text box to General Number or similar, so
that it accepts only numbers.

2. In query design view, declare your parameter by choosing Parameters on
the Query menu, and in the dialog entering:
[Forms].[MyForm].[txtWeekNumber] Long Integer

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

"Paul van der Heijden" <Paul van der (e-mail address removed)>
wrote in message
news:[email protected]...
 
Or you can use a table.

Put the week number into the table, then add that table to your query.

When you want to run the queries, first open the table and reset the number.

(david)
 
Back
Top