B
Billp
Hi,
If I run the following
'Number example.
If Not IsNull(Me.txtPCode) Then
strWhere = strWhere & "([Address5] >= " & Me.txtPCode & " ) AND "
End If
'Number field example.
If Not IsNull(Me.txtPCodeEnd) Then 'Less than the next.
strWhere = strWhere & "([Address5] <= " & Me.txtPCodeEnd & ") AND "
End If
I get a runtime "You Cancelled the previous operation.
However if I replace with
'Text field example. Use Like to find anywhere in the field.
'If Not IsNull(Me.txtPCode) Then
'strWhere = strWhere & "([Address5] Like ""*" & Me.txtPCode & "*"")
AND "
'End If
all is OK
The field "Address5" is a text field
If I run the following
'Number example.
If Not IsNull(Me.txtPCode) Then
strWhere = strWhere & "([Address5] >= " & Me.txtPCode & " ) AND "
End If
'Number field example.
If Not IsNull(Me.txtPCodeEnd) Then 'Less than the next.
strWhere = strWhere & "([Address5] <= " & Me.txtPCodeEnd & ") AND "
End If
I get a runtime "You Cancelled the previous operation.
However if I replace with
'Text field example. Use Like to find anywhere in the field.
'If Not IsNull(Me.txtPCode) Then
'strWhere = strWhere & "([Address5] Like ""*" & Me.txtPCode & "*"")
AND "
'End If
all is OK
The field "Address5" is a text field