J
Jen Fields
Hello,
I'm trying to use StrSQL to build the where clause of my query and am having
difficulty. My problem is in the ELSEIF me.txtcrit1 = "person at scene last
name" then strlsql = "[Identifiedstype] = 'Person at scene' (See below)
what I'm trying to do is to put identifiedstype='person at scene' and
lastname = (whatever the value of txtval1) into my where clause, but I'm
being prompted as if identifiedstype is a parameter. BTW - when prompted If
I enter Person at scene it works great... I'm trying to bypass the prompt...
Any and all assistance is greatly appreciated. thx
If Me.txtCrit1 > "" Then
If Me.txtOper1 = "like" Then
strSQL = "[" & Me.txtCrit1 & "]" & " " & (Me.txtOper1) & " '*" &
Trim(Me.txtVal1) & "*'" '
ElseIf Me.txtCrit1 = "Person At Scene Last Name" Then
strSQL = "[IdentifiedsType] = 'Person At Scene' And [last name] = " & "
'" & Trim(Me.txtVal1) & "'" '
ElseIf Me.txtCrit1 = "eventid" Or Me.txtCrit1 = "booknumber" Or
Me.txtCrit1 = "pagenumber" Or Me.txtCrit1 = "EVENTDATE" Or Me.txtCrit1 =
"ENTRYDATE" Then
strSQL = "[" & Me.txtCrit1 & "]" & " " & (Me.txtOper1) & "" &
(Me.txtVal1) & "" '
ElseIf Me.txtCrit1 > "" And Me.txtCrit1 <> "eventid" Or Me.txtCrit1 <>
"booknumber" Or Me.txtCrit1 <> "pagenumber" Or Me.txtCrit1 = "EVENTDATE" Or
Me.txtCrit1 = "ENTRYDATE" Then
strSQL = "[" & Me.txtCrit1 & "]" & " " & (Me.txtOper1) & "'" &
(Me.txtVal1) & "'" '
End If
End If
I'm trying to use StrSQL to build the where clause of my query and am having
difficulty. My problem is in the ELSEIF me.txtcrit1 = "person at scene last
name" then strlsql = "[Identifiedstype] = 'Person at scene' (See below)
what I'm trying to do is to put identifiedstype='person at scene' and
lastname = (whatever the value of txtval1) into my where clause, but I'm
being prompted as if identifiedstype is a parameter. BTW - when prompted If
I enter Person at scene it works great... I'm trying to bypass the prompt...
Any and all assistance is greatly appreciated. thx
If Me.txtCrit1 > "" Then
If Me.txtOper1 = "like" Then
strSQL = "[" & Me.txtCrit1 & "]" & " " & (Me.txtOper1) & " '*" &
Trim(Me.txtVal1) & "*'" '
ElseIf Me.txtCrit1 = "Person At Scene Last Name" Then
strSQL = "[IdentifiedsType] = 'Person At Scene' And [last name] = " & "
'" & Trim(Me.txtVal1) & "'" '
ElseIf Me.txtCrit1 = "eventid" Or Me.txtCrit1 = "booknumber" Or
Me.txtCrit1 = "pagenumber" Or Me.txtCrit1 = "EVENTDATE" Or Me.txtCrit1 =
"ENTRYDATE" Then
strSQL = "[" & Me.txtCrit1 & "]" & " " & (Me.txtOper1) & "" &
(Me.txtVal1) & "" '
ElseIf Me.txtCrit1 > "" And Me.txtCrit1 <> "eventid" Or Me.txtCrit1 <>
"booknumber" Or Me.txtCrit1 <> "pagenumber" Or Me.txtCrit1 = "EVENTDATE" Or
Me.txtCrit1 = "ENTRYDATE" Then
strSQL = "[" & Me.txtCrit1 & "]" & " " & (Me.txtOper1) & "'" &
(Me.txtVal1) & "'" '
End If
End If