In Access 2003, I am trying to sort the combobox "Model". The "Model" rowsource is chosen based on the "Product Type" choice (i.e. Compressors, Actuators or Valves).
How can I code it so that each choice loaded as the rowsource will be sorted in ascending order.
I have the following code:
So an example is if "Compressor s" is chosen in "Product Type" and "Model" rowsource = the contents of "tbl1", how can I sort those contents???
I was blindly trying to add into the code something like:
Model.RowSource = "tbl3", SORT BY
But it errors out.
Thanks!
How can I code it so that each choice loaded as the rowsource will be sorted in ascending order.
I have the following code:
Code:
Private Sub Product_Type_AfterUpdate()
Select Case Product_Type.Value
Case "1. Compressors"
Model.RowSource = "tbl1"
Case "2. Actuators"
Model.RowSource = "tbl2"
Case "3. Valves"
Model.RowSource = "tbl3"
End Select
End Sub
I was blindly trying to add into the code something like:
Model.RowSource = "tbl3", SORT BY
But it errors out.
Thanks!
Comment