parameter value

piet123

piet
Local time
Today, 06:01
Joined
May 24, 2004
Messages
66
Good Morning,

In a previous thread i asked this: In the query's underlying table is a field for "Customer Name". The query generates a Report which calculates the "Total Cost" for a specified customer. In the query I have set the criteria for the 'customer name' field to [Type the Customer's Name]. When the query runs, the Enter Parameter Value box prompts for "Type the Customer's Name". My question: Instead of having to type the customer's name, I want to display a combo box (or drop list) from where I can select a customer's name. The report will then display the totals for that selected customer. How do I do this ?

Steve gave this answer: "Create your form with combo box on and a command button to launch your report. Then in the input parameters field type :- Forms![frmMyform]![cboMycombo] "

Thanks, i eventually got it to do that. So now the Query runs with criteria- Forms![frmMyform]![cboMycombo] and opens the Report with the info it got from the Query (frm, cbo).

-> But now the Form with the Combo on stays Open (on top of the Report)
I've tried a few ways to make it close After Update, but then get ERROR which, if i understand correctly means that the Combo closes before the Selected Item in combo list is passed on to the report (or query).

My question is: How to Close the Form with the Combo on, After the Report has opened.

Please help.
 
You don't just change its visible property and close it when the report closes.
DoCmd OpenReport etc
Forms!YourForm.Visible = False
 

Users who are viewing this thread

Back
Top Bottom