variable query

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

Guest

Sorry im a newbie.
I have a simple table that has data with a week number.
how do i get a form to ask for a week number, then input that week number
into the query to show the results in a report?
Can anyone piont me in the correct direction?
Regards
Warren
 
One way is to put [Week Number?] as the criteria in the query. When the
query runs, a dialog box will pop up, asking the user for the value.

Another approach is to have a control on the form to which the user supplies
the value. (It can be a text box, a combo box, a list box, etc.). You'd then
put Forms![NameOfForm]![NameOfControl] as the criteria in the query
(replacing NameOfForm and NameOfControl with the appropriate names). The
form must be open when the query runs: Access will not open the form for
you.
 
Brill, stumbled on the first one, the second one is what settled on.
Thank you.
Warren.

Douglas J. Steele said:
One way is to put [Week Number?] as the criteria in the query. When the
query runs, a dialog box will pop up, asking the user for the value.

Another approach is to have a control on the form to which the user supplies
the value. (It can be a text box, a combo box, a list box, etc.). You'd then
put Forms![NameOfForm]![NameOfControl] as the criteria in the query
(replacing NameOfForm and NameOfControl with the appropriate names). The
form must be open when the query runs: Access will not open the form for
you.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


warren said:
Sorry im a newbie.
I have a simple table that has data with a week number.
how do i get a form to ask for a week number, then input that week number
into the query to show the results in a report?
Can anyone piont me in the correct direction?
Regards
Warren
 
Back
Top