Query combo box

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
 
M

Michel Walsh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top