Query combo box

  • Thread starter Thread starter Kram
  • Start date Start date
K

Kram

I have a combo box in a table that I want to reference in
a query. I need a pop up box from the criteria line as
[Genre] that displays as a como box again and not as a
blank inquiry box. The related field has 5 film genres
listed in it which I call from my input form.
thanks DukE
 
Hi,



You can refer to a control in a form through the syntax

FORMS!FormNameHere!ControlNameHere


as long as you use DoCmd, or a statement for a domain function, or for a
property.


Me.ComboBoxName.RowSource= "SELECT .... WHERE ... genre =
FORM!myForm!MyControl "

as example, should work fine. The assignation of the RowSource property
will, by itself, change (requery) the list of the combo box, without having
to do anything else (than to specify the RowSource with the new string).You
can put the line of code in the afterUpdate event of "myControl" of the said
form, as example.




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top