2

Can you pass a variable to a query which will populate a combo box? If so, how?

1 Answer 1

1

You can set the row source of a combobox in a number of ways. For example, you could include the following in the current event:

 Me.ComboX.RowSource = _
    "SELECT ID, Description FROM Table WHERE AText='" & MyVar & "'"

Alternatively, you can refer to a form in code or in design view:

 SELECT ID, Description FROM Table WHERE AText=Forms!AnOpenForm!AControl

You may also wish to consider cascading comboboxes : Is there a simple way of populating dropdown in this Access Database schema?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.