I am trying to include a combo box as a search function in the header of a form. The combo box shows a list of club members, and when one is selected, I want the form to show the details for that member. I note earlier versions of Access had this as an option in the combo box settings, but I believe this now has to be done with VB as an "after update" code. I have tried the following VB code but various errors are encountered....
Private Sub SearchCombo_AfterUpdate()
On Error GoTo Err_Process
Dim strCriteria As String
If (Not IsNull(Me.SearchCombo)) Then
strCriteria = "<Last Name>=" & Me.SearchCombo
End If
Me.Filter = strCriteria
Me.FilterOn = (strCrtieria <> "")
Exit_Process:
Exit Sub
Err_Process:
MsgBox Err.Number & " " & Err.Description
Resume Exit_Process
End Sub
I might be miles away from the correct solution here, but any help would be appreciated.
Cheers
Stuart