many queries with same parameters

K

kristy

I am running several queries in a row that ask for the
same parameters (begin dates, end dates). They are
running within a macro. I have to rekey the paramaters
every time a new query starts. Is there a way to ask for
this information one time and then use the results in
several queries without having to reenter?
 
K

Ken Snell

Create a form that has textboxes on it for the values you want to use. Then
have the queries read the textboxes instead of asking for parameters:

Between [Forms]![Formname]![txtBoxName1] And
[Forms]![Formname]![txtBoxName2]

for example.

The form will need to be open while all the queries run.
 
K

Kristy

THANK YOU!! That did the trick!
-----Original Message-----
Create a form that has textboxes on it for the values you want to use. Then
have the queries read the textboxes instead of asking for parameters:

Between [Forms]![Formname]![txtBoxName1] And
[Forms]![Formname]![txtBoxName2]

for example.

The form will need to be open while all the queries run.

--
Ken Snell
<MS ACCESS MVP>

kristy said:
I am running several queries in a row that ask for the
same parameters (begin dates, end dates). They are
running within a macro. I have to rekey the paramaters
every time a new query starts. Is there a way to ask for
this information one time and then use the results in
several queries without having to reenter?


.
 
K

Ken Snell

You're welcome.

Kristy said:
THANK YOU!! That did the trick!
-----Original Message-----
Create a form that has textboxes on it for the values you want to use. Then
have the queries read the textboxes instead of asking for parameters:

Between [Forms]![Formname]![txtBoxName1] And
[Forms]![Formname]![txtBoxName2]

for example.

The form will need to be open while all the queries run.

--
Ken Snell
<MS ACCESS MVP>

kristy said:
I am running several queries in a row that ask for the
same parameters (begin dates, end dates). They are
running within a macro. I have to rekey the paramaters
every time a new query starts. Is there a way to ask for
this information one time and then use the results in
several queries without having to reenter?


.
 

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