S
Shawn
I have a database with two tables users and managers, which have a
relationship based on the manager_lname field. I created a form where
a user can select a manager's name from a dropdown (combobox) and it
would filter the data in the listbox. The data from the list box comes
from the users table. The problem is that when the manager's name is
selected a box appears stating "Enter Parameter Value". When I enter
the manager's name in to the box the filter works. I would like it to
filter as soon as a name is selected from the dropdown. In the
dropdown event I enter the following code to handle the filter.
Private Sub Combo2_AfterUpdate()
Dim strsql
Me.Combo2.SetFocus
strsql = "Select * from users"
strsql = strsql & " WHERE manager_last=" & Me.Combo2
Me.List6.RowSource = strsql
End Sub
Any help provided would be appreciated.
relationship based on the manager_lname field. I created a form where
a user can select a manager's name from a dropdown (combobox) and it
would filter the data in the listbox. The data from the list box comes
from the users table. The problem is that when the manager's name is
selected a box appears stating "Enter Parameter Value". When I enter
the manager's name in to the box the filter works. I would like it to
filter as soon as a name is selected from the dropdown. In the
dropdown event I enter the following code to handle the filter.
Private Sub Combo2_AfterUpdate()
Dim strsql
Me.Combo2.SetFocus
strsql = "Select * from users"
strsql = strsql & " WHERE manager_last=" & Me.Combo2
Me.List6.RowSource = strsql
End Sub
Any help provided would be appreciated.