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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CAN I USE ONE PARAMETER VALUE FOR MULTIPLE QUERIES

Status
Not open for further replies.

eastmanj

Technical User
Nov 7, 2001
5
US
Here is the problem I'm having. I work in a legal office. I use an access database to log in clients' information, such as type of action, attorney seen, date seen, etc. At the end of each month I have to do a monthly report that tells how many of each type of action were processed that month. So I developed a query for each type of action that, when executed, first asks for the report month and then lists all of those types of actions for that month. I would now like to create a macro that will run each query but ask for the report month only once. I would also like the macro to send the number of each type of action processed to a report. So basically I don't need the client info in my final report, just the numbers resulting from each query. I may be going about this the wrong way but I am very new to access. Any suggestions would be greatly appreciated
 
Hi,

The way I would do it would be to create a form. In that form have a text box where the user would type in the report month. The user would then click on the 'Run' button.
In each of your queries, instead of having your [enter parameter], you would have:
forms!formName!textBoxName

where formName is the name of the form with the text box, and textBoxName is the name of your text box (where the user types in the report month).

For this to work, the form will need to stay open during the running of these queries. Am I making sense?? Hope this is ok. If not, just let me know.

Nick (Everton Rool OK!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top