Pass one parameter date?

T

TKM

I am exporting two reports from one button on my form. I have two queries
running 2 seprate reports. How do I go about passing the parameter to the
other report? In other words I want the user to type in the first and second
date only once to open the report, not twice. This report is being exported
to Excel if that makes any difference?
 
J

Jeff L

Make two textboxes on your form, one for StartDate and one for EndDate.
Now in your queries use the textboxes instead of the popups. You
refer to the textboxes like this:
Forms!YourFormName!StartDate
Forms!YourFormName!EndDate

If you call your textboxes something other than StartDate and EndDate,
then use those names instead.

Hope that helps!
 
T

TKM

I kind of get it but have two questions.
1. I have an output button on my main form that runs the code (queries)
2. you say "in my queries use text boxs instead of popups. Are the popups
parameter settings? As you can see a bit confusing. Do I put the text boxes
in my criteria or?
 
J

Jeff L

1. I have an output button on my main form that runs the code (queries)

That's fine, shouldn't be a problem.


2. you say "in my queries use text boxs instead of popups. Are the
popups
parameter settings?
Yes.

Do I put the text boxes in my criteria or?
Yes
 
T

TKM

Jeff thanks for the advise. However I have one problem. The user must enter a
start date and a end date. These dates come from the same field in one table.
When I run my code I want only one start date and enter one end date to show
and not the 2 and 3 that I am getting. It comes from a nested query that Iam
useing. Any Ideas?
 

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