Drop Down List in Query

  • Thread starter Thread starter Gee
  • Start date Start date
G

Gee

I have a report running off a query. The query is based
on a table. In the table, my "Manuf." control is a list.
How do I get the query to recognize the list?
When the report runs I get the "Enter Manuf" box, no
problem...but I don't want it to be a 'type in the name'
kind of thing...I want the same drop down that's on the
table (and the form it's linked to) to show up when you
run the query.
Help?
 
I have a report running off a query. The query is based
on a table. In the table, my "Manuf." control is a list.
How do I get the query to recognize the list?
When the report runs I get the "Enter Manuf" box, no
problem...but I don't want it to be a 'type in the name'
kind of thing...I want the same drop down that's on the
table (and the form it's linked to) to show up when you
run the query.
Help?

Make a new unbound form.
Add a List (or Combo Box) to the form, using the Manuf field as it's
row source.
** Make sure the List Box's bound column is the same datatype as the
column in the query.**
Add a command button.
Code it's Click event:
Me.Visible = False
Name this form "ParamForm".

Change the query prompt from [Enter Manuf] to
forms!ParamForm!ListBoxName

Code the Report's Open Event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

Run the Report.
The Report will open the Form.
Select the correct criteria from the Manuf control.
Click the command button.

The Form will disappear and the report will display (or Print).
When the Report closes, it will close the form.
 
Thanks again!
I appreciate your letting me use your brain.
-----Original Message-----
I have a report running off a query. The query is based
on a table. In the table, my "Manuf." control is a list.
How do I get the query to recognize the list?
When the report runs I get the "Enter Manuf" box, no
problem...but I don't want it to be a 'type in the name'
kind of thing...I want the same drop down that's on the
table (and the form it's linked to) to show up when you
run the query.
Help?

Make a new unbound form.
Add a List (or Combo Box) to the form, using the Manuf field as it's
row source.
** Make sure the List Box's bound column is the same datatype as the
column in the query.**
Add a command button.
Code it's Click event:
Me.Visible = False
Name this form "ParamForm".

Change the query prompt from [Enter Manuf] to
forms!ParamForm!ListBoxName

Code the Report's Open Event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"

Run the Report.
The Report will open the Form.
Select the correct criteria from the Manuf control.
Click the command button.

The Form will disappear and the report will display (or Print).
When the Report closes, it will close the form.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top