I use the code below on a search form to filter my table for data. The code works pretty well but it has one bug. The text box on my form that captures when the event occurred has 3 types Pre-Admin, Admin and Post-Admin. The problem is whe the user selects one of these types from the dropdown on the search form all the types show because the string below is using the Like statement and * to filter. So eveything shows. Is there a way to modify the lines below to only show exactly what is selected on the search form? So if the user selects Pre-Admin only Pre-admin records will show. Thanks..
If Not IsNull(Me.txtOccurring) Then
strWhere = strWhere & " (SiteIssues_tbl.Occurring) Like '*" & Me.txtOccurring & "*' AND"
End If
If Not IsNull(Me.txtOccurring) Then
strWhere = strWhere & " (SiteIssues_tbl.Occurring) Like '*" & Me.txtOccurring & "*' AND"
End If