Can you pass a variable to a query which will populate a combo box? If so, how?
1 Answer
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?