D
dina
Hi,
I have a criteria search page where I have about 10 or
eleven data items that a user may search by. I need the
search to be use the AND boolean string.
How do I write it so that the result is that it returns
for example, the person or people with the last
name 'Smith' who ordered between 01-01-03 and 09-01-03?
Right now it is returning those which are Smith or
ordered between the chosen dates.
If Not txtLastName = "" Then
If strWHERE <> "" Then strWHERE = strWHERE & " and "
strWHERE = strWHERE & "tblContacts.LastName LIKE '*" &
txtLastName & "*'"
' MsgBox (strWHERE)
End If
If Not ([txtOrderBeginDate]) Or [txtOrderEndDate] = ""
Then
strWHERE = "[OrderDate] Between #" &
[txtOrderBeginDate] _
& "# And #" & [txtOrderEndDate] & "#"
End If
I have a criteria search page where I have about 10 or
eleven data items that a user may search by. I need the
search to be use the AND boolean string.
How do I write it so that the result is that it returns
for example, the person or people with the last
name 'Smith' who ordered between 01-01-03 and 09-01-03?
Right now it is returning those which are Smith or
ordered between the chosen dates.
If Not txtLastName = "" Then
If strWHERE <> "" Then strWHERE = strWHERE & " and "
strWHERE = strWHERE & "tblContacts.LastName LIKE '*" &
txtLastName & "*'"
' MsgBox (strWHERE)
End If
If Not ([txtOrderBeginDate]) Or [txtOrderEndDate] = ""
Then
strWHERE = "[OrderDate] Between #" &
[txtOrderBeginDate] _
& "# And #" & [txtOrderEndDate] & "#"
End If