Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only asking for the date to run a query once?

Status
Not open for further replies.

Lunatic

Technical User
May 8, 2006
405
US
I've run into a minor roadblock, there is a workaround, I'd just prefer not to have to use it. I want to run 19 queries off of a master query but only ask the user to enter the date "[]" once.

I realize this is not going to be an elegant structure, its more of a bumbling brute force design, but here's the current structure:

Base query - asks for date []

19 querys - each runs off the base query and has a different person's name specified

19 reports - one off of each of the 19 querys

Macro - Has 19 sendobjects which will e-mail each individualized report to the 19 seperate people and their supervisor.

***

Everything works, even if its about as far from elegant as it can be, however when the macro is run the user must enter the request date 19 times. If there is a way I would really prefer that the user only has to enter the date once.

I know this will open 19 mail messages, but the computers are capable of dealing with this so I'm not worried about that part.

Thank you ahead of time for any suggestions
 
Use a parameter(s) form instead of the default query InputBox.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Dang... I'm more dense than I thought... What exactly do you mean by "use a parameter form"?

I've checked the FAQs in the Access Forms Forums, checked Access' Help file, googled it, but for the life of me I can't figure out what you mean. Its probably something I already know but by a different name.

My appologies and it looks like I'm in the wrong forum as well if its a form that I need to use. I just couldn't figure out how to do it so I figured that meant if it was possible it would be through VB code.
 
Make a form with a text box to enter the request date on then add a button. Have your button's click event run your queries. Modify your queries to use the text box value from the form, i.e. Select stuff from table where date = Forms![Form name].textboxname.value

HTH, Ken.
 
Thank you all, that worked wonderfully!
 
Glad I could be of help. I always feel like I get more than I give here.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top