Hello
I'd like to filter the subform based on the combo boxes.
I'd like to be able to select "role title" then "country".
At the moment this only works independently. If I select "role title" and then "country" it loses the selected "role title"
Heres my vba
Much appreciated
I'd like to filter the subform based on the combo boxes.
I'd like to be able to select "role title" then "country".
At the moment this only works independently. If I select "role title" and then "country" it loses the selected "role title"
Heres my vba
Code:
Private Sub country_AfterUpdate()
Dim Country As String
mycountry = "Select* from tblPlannedRoles where ([Country]= '" & country& "')"
Me.[tblPlannedRoles subform1].Form.RecordSource = mycountry
Me.[tblPlannedRoles subform1].Form.Requery
End Sub
Private Sub role_AfterUpdate()
Dim role As String
myrole = "Select* from tblPlannedRoles where ([role title]= '" & Me.role & "')"
Me.[tblPlannedRoles subform1].Form.RecordSource = myrole
Me.[tblPlannedRoles subform1].Form.Requery
End Sub
Much appreciated