A family of Microsoft relational database management systems designed for ease of use.
If you've been working with Access since 2003, then it's high time you get away from wizards and macros and learn to do this using VBA.
In your combo box's AfterUpdate event, add the following code:
Private Sub CbxExample_AfterUpdate()
On Error GoTo Err_Process
Dim strCriteria As String
'Make sure to format the compare item accordingly for text, date or numeric data
'For text, enclose compare item in quotes (")
'For dates, enclose comprare item in pound signs (#)
'Numeric data does not require special format characters
'
'Examples:
'Text - strCriteria = "<your field name>=" & Chr(34) & CompareItem & Chr(34)
'Date - strCriteria = "<your field name>=#" & CompareItem & "#"
'Numeric - strCriteria = "<your field name>=" & CompareItem
If (Not IsNull(Me.CbxExample)) Then
strCriteria = "<your field name>=" & Me.CbxExample
End If
Me.Filter = strCriteria
Me.FilterOn = (strCrtieria <> "")
Exit_Process:
Exit Sub
Err_Process:
MsgBox Err.Number & " " & Err.Description
Resume Exit_Process
End Sub
is selected.
tool
or the Combo Box
tool.