By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,775 Members | 2,658 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,775 IT Pros & Developers. It's quick & easy.

Multiple Parameter Prompts

P: 1
I built a database at my job for tracking and reporting debt records. I am very new at using Access and have basically trained myself. Here's my problem:

I created a parameter query using a form to prompt for a begin date and an end date.This returns a report with a result set of all records that fall within the dates specified. The report has 3 sub reports as well, which also uses the date criteria from the form. When I enter my begin and end dates into the form the reports pop up, but then additional parameter boxes pop up multiple times asking for the same dates over and over again. I'm assuming it's because I need to enter the dates for each report and subreport. Is there a way for me to stop this from happening?
Jan 10 '08 #1
Share this Question
Share on Google+
4 Replies


P: 45
I would declare the variables by name for your start and stop dates as "Public". You declare them once and all your forms and reports will use the same values whenever they are changed.
Jan 11 '08 #2

Expert 100+
P: 634
I built a database at my job for tracking and reporting debt records. I am very new at using Access and have basically trained myself. Here's my problem:

I created a parameter query using a form to prompt for a begin date and an end date.This returns a report with a result set of all records that fall within the dates specified. The report has 3 sub reports as well, which also uses the date criteria from the form. When I enter my begin and end dates into the form the reports pop up, but then additional parameter boxes pop up multiple times asking for the same dates over and over again. I'm assuming it's because I need to enter the dates for each report and subreport. Is there a way for me to stop this from happening?
Hi

If the dates are entered into a form (Textboxs), then I would link the query to the text boxes. However, for this to work the form must be loaded (not necessarily visible) when the queries run.

MTB
Jan 11 '08 #3

Minion
Expert 100+
P: 108
MTB has the right idea here I think. Though I'm not sure exactly what is driving the sub reports so that makes it a bit difficult. Currently, how are they retrieving their values for the start and end dates? This will really determine the best method of passing these values to them. It may be a simple as adding a hidden field on the report and setting up a parent / child type relationship to the main report or the values could be passed programically.

Hope this helps.

- Minion -
Jan 11 '08 #4

P: 45
Declaring a Public variable is the easiest way since you don't need hidden fields and the forms that was used to request the report need not be open.

Which means you can open report after report or form after form in no specific order and the dates wil be avaibale to all your objects.

Declaring a Public variable is one line of code.
Jan 11 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.