I'm using the following code to do searches with numeric and text fields.
Private Sub Command12_Click()
If " & field & " = TUBE_NO Then
strSQL = " Select * from master WHERE " & field & "" &_ operand & "" & criteria & ";"
Else
strSQL = " Select * from master WHERE " & field & "" &_ operand & "'" & criteria & "';"
End If
Me.result.RowSource = strSQL
End Sub
It skips to the else statement even though the selected field is TUBE_NO.
ANY THOUGHTS
THANKS,
Private Sub Command12_Click()
If " & field & " = TUBE_NO Then
strSQL = " Select * from master WHERE " & field & "" &_ operand & "" & criteria & ";"
Else
strSQL = " Select * from master WHERE " & field & "" &_ operand & "'" & criteria & "';"
End If
Me.result.RowSource = strSQL
End Sub
It skips to the else statement even though the selected field is TUBE_NO.
ANY THOUGHTS
THANKS,