Expand|Select|Wrap|Line Numbers
- queerey = Replace(Text3, "or", "' or OrderID ='")
- strSQL2 = "SELECT * FROM tblorder where orderID = '" & queerey & "'"
- DoCmd.OpenReport "tblorder1", acViewPreview, strSQL2
- MsgBox strSQL2
SELECT * FROM tblorder where orderID = '1 ' or orderID = ' 2'
which means that it wont work because of the spaces. I have tried it using
Expand|Select|Wrap|Line Numbers
- strSQL2 = "SELECT * FROM tblorder where orderID = '1' OR orderID = '2'"