Multiple Prompts on Report

Robster

Registered User.
Local time
Yesterday, 22:08
Joined
Mar 13, 2014
Messages
60
I have a blank report and dragged two queries to it so that they are displayed on it. Both queries prompt for a Customer code. How do I get it that I only have to type it in once rather than for each query prompt?
 
Enter the code on a form and have both queries get it from there.
 
Do I have to create a temp table behind the form?
Don't know how to store data from form to be retrieve by a query.
 
No, do the following,

1. Create a Form, with one TextBox and one Button, name the textbox customerID, save the Form with a name say reportDataForm. Save and Close the form.
2. Now go to the two queries which are used for the Report. Say if your Queries look like.
Code:
SELECT someFields FROM someTable
WHERE customerID = [enterID:];
Change it to,
Code:
SELECT someFields FROM someTable
WHERE customerID =Forms!reportDataForm!customerID;
3. This form will now get the Query sorted for you,
4. Now code the button to simply open the report after entering the ID.
 

Users who are viewing this thread

Back
Top Bottom