Hello,
I have a form with a combo and a listbox. I would like to change the listbox records source depending on the selection of the combo.
The combo's records source is Table1. I have then created two queries that should populate the listbox:
If Me.myCombo.Value = "Clients" Then
Me.mylist.RowSource = "qryClients"
Me.mylist.Requery
Else
me.mycombo.value = "Supplies" Then
me.mylst.rowsource = "Qrysupplies"
End If
End if
Unfortunately the above code is not working.
Appreciate any help with this matter. Thanks
I have a form with a combo and a listbox. I would like to change the listbox records source depending on the selection of the combo.
The combo's records source is Table1. I have then created two queries that should populate the listbox:
If Me.myCombo.Value = "Clients" Then
Me.mylist.RowSource = "qryClients"
Me.mylist.Requery
Else
me.mycombo.value = "Supplies" Then
me.mylst.rowsource = "Qrysupplies"
End If
End if
Unfortunately the above code is not working.
Appreciate any help with this matter. Thanks