E
Erin Freeman
I am using the search form and I love it, however, i am trying to search 24
fields now and as soon as i word wrap in the visual basic editor window it
doesnt work....
If Not IsNull(Me.txtsub) Then
strWhere = strWhere & "([SubDept A1] Like ""*" & Me.txtsub & "*""
Or [SubDept B1] Like ""*" & Me.txtsub & "*"" Or [SubDept C1] Like ""*" &
Me.txtsub & "*"" Or [SubDept D1] Like ""*" & Me.txtsub & "*"" Or [SubDept E1]
Like ""*" & Me.txtsub & "*"" Or [SubDept F1] Like ""*" & Me.txtsub & "*"" Or
[SubDept G1] Like ""*" & Me.txtsub & "*"" Or [SubDept H1] Like ""*" &
Me.txtsub & "*"" Or [SubDept I1] Like ""*" & Me.txtsub & "*"" ) AND "
End If
Here is my code (with less seach fields) you get the idea, So what i was
trying to do is just before the ) AND " i put a _ to word wrap, and then
continue on, however when i am all done, it tells me that the ) at the end is
an expected end of statment...any ideas?
fields now and as soon as i word wrap in the visual basic editor window it
doesnt work....
If Not IsNull(Me.txtsub) Then
strWhere = strWhere & "([SubDept A1] Like ""*" & Me.txtsub & "*""
Or [SubDept B1] Like ""*" & Me.txtsub & "*"" Or [SubDept C1] Like ""*" &
Me.txtsub & "*"" Or [SubDept D1] Like ""*" & Me.txtsub & "*"" Or [SubDept E1]
Like ""*" & Me.txtsub & "*"" Or [SubDept F1] Like ""*" & Me.txtsub & "*"" Or
[SubDept G1] Like ""*" & Me.txtsub & "*"" Or [SubDept H1] Like ""*" &
Me.txtsub & "*"" Or [SubDept I1] Like ""*" & Me.txtsub & "*"" ) AND "
End If
Here is my code (with less seach fields) you get the idea, So what i was
trying to do is just before the ) AND " i put a _ to word wrap, and then
continue on, however when i am all done, it tells me that the ) at the end is
an expected end of statment...any ideas?