Hi
I was reading a lot of posts but couldn't find an answer for my problem.
I' ve got a combo box (EveRegion) and a list box (Location). After choosing a region in the combo box the list box need to show all matching locations. Both boxes are unbound. The combo box got the following row source
Code:
SELECT Distinct tblLocation.LocRegionRef FROM tblLocation;
and no control source. The list box has neither a control source nor a row source. The form has no record source. I don't get an error. I am using the following code in the after update event of the combo box.
Code:
Private Sub EveRegion_AfterUpdate()
Dim strRS As String
strRS = "SELECT tblLocation.LocLocation FROM tblLocation"
If Not IsNull(Me.EveRegion) Then
strRS = strRS & " WHERE LocRegionRef = " & Me.EveRegion
End If
Me.Location.RowSource = strRS
Me.Location.Requery
End Sub
When I stop the code and look at every line of the code it shows me that strRS has the correct content but the Me.argument at the end of the code is empty (Me.Location = ""). I am not sure if the error is in the code or in the settings of the properties.
I changed and tried a lot so I just don't now what else I could try. Probably it's a simple problem just can't see it. Very happy about every advice. Thanks.