It wouldn't let me post my zip file or my accdb file because a security image was missing.
I'm posting this here. Maybe this will help.
This is my code for searching on the whole search form.
Option Compare Database
Option Explicit
Private Sub Command72_Click()
Dim strWhere As String
Dim lngLen As Long
Const conJetDate = "\#mm\/dd\/yyyy\#"
If Not IsNull(Me.CaseTitle) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([CaseTitle] Like ""*" & Me.CaseTitle & "*"") "
End If
If Not IsNull(Me.CaseSummary) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([CaseSummary] Like ""*" & Me.CaseSummary & "*"") "
End If
If Not IsNull(Me.CaseType) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([CaseType] Like ""*" & Me.CaseType & "*"") "
End If
If Not IsNull(Me.InitiatorType) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([InitiatorType] Like ""*" & Me.InitiatorType & "*"") "
End If
If Not IsNull(Me.InitiatorName) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([InitiatorName] Like ""*" & Me.InitiatorName & "*"") "
End If
If Not IsNull(Me.OutsideOrganizationType) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([OutsideOrganizationType] Like ""*" & Me.OutsideOrganizationType & "*"") "
End If
If Nz(Me.CommitteeContact, "") = "" Then
Me.FilterOn = False
Else
Me.Filter = "CommitteeContact = '" & Me.CommitteeContact & "'"
Me.FilterOn = True
Debug.Print Me.Filter
End If
If Not IsNull(Me.OutsideOrganizationName) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([OutsideOrganizationName] Like ""*" & Me.OutsideOrganizationName & "*"") "
End If
If Not IsNull(Me.Resolution) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([Resolution] Like ""*" & Me.Resolution & "*"") "
End If
If Not IsNull(Me.AdditionalRemarksRegardingResolution) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([AdditionalRemarksRegardingResolution] Like ""*" & Me.AdditionalRemarksRegardingResolution & "*"") "
End If
If Not IsNull(Me.BroughttoCommitteeMtg) Then
strWhere = strWhere & IIf(strWhere <> "", " AND ", "") & "([BroughttoCommitteeMtg] Like ""*" & Me.BroughttoCommitteeMtg & "*"") "
End If
DoCmd.OpenReport "UseOfNameCommitteeSpecialReport", acViewPreview, , strWhere
End Sub
Please let me know if you have any additional thoughts on this. I am very grateful for the help.