G
Guest
How do I create a drop down list from which to select a criteria for a query?
AJ said:When I do this the query still starts with a dialog box that asks for
[Forms]![MyForms]!MyCombobox. Suggestions?
thanks
aj
PC Datasheet said:Say the drop-down list named MyCombobox is on a form named MyForm. Put this
expression in the criteria of the appropriate field in your query:
Forms!MyForm!MyCombobox
You need to make a selection in the combobox before the form opens or if the
combobox is on MyForm, you need to enter this expression in the AfterUpdate
event of the combobox:
Me.Requery
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
Lynn Trapp said:[Forms]![MyForms]!MyCombobox.
This was purely a suggestion. You need to use the actual names of the
objects. For instance, on a form named frmOrders with a combobox names
cboCompanyName you would have this syntax:
Forms!frmOrders!cboCompanyName
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
AJ said:When I do this the query still starts with a dialog box that asks for
[Forms]![MyForms]!MyCombobox. Suggestions?
thanks
aj
PC Datasheet said:Say the drop-down list named MyCombobox is on a form named MyForm. Put this
expression in the criteria of the appropriate field in your query:
Forms!MyForm!MyCombobox
You need to make a selection in the combobox before the form opens or if the
combobox is on MyForm, you need to enter this expression in the AfterUpdate
event of the combobox:
Me.Requery
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
How do I create a drop down list from which to select a criteria for a
query?