I have 2 combo boxes on a form
cboWkLoc This selects workers city where employed This combo gets data from company table
CboEmp This Selects Employee
I am trying to join these both combos so when I select City (e.g Reno ) its shows only employees working in Reno - This combo gets data from Purchases table
I have tried to work on the following code but could not figure it out.
Private Sub cboWkLoc_AfterUpdate()
Dim strSource As String
strSource = "SELECT City " & _
"FROM Purchase " & _
"WHERE Employee = '" & Me.cboWkLoc & "' ORDER BY City"
Me.cboEmp.RowSource = strSource
Me.cboEmp = vbNullString
End Sub