I am listing records in a listbox using SQL in VBA code. I am needing to filter the records by a column that has the following values "Complete", "Rejected", "Transferred", "Working", "Hold", or could even be Null.
What I want is to only display the records that are not Rejected or Transferred. I thought it would be easier to have the SQL read
SELECT * FROM tbl WHERE Action <> "Rejected"
but when I try to add the other parameter it does not work. Like this...
SELECT * FROM tbl WHERE Action <> "Rejected" OR Action <> "Transferred"
The returned records show records that are rejected, but not ones transferred.
Can someone help. I am hoping that I do not have to list out all the parameters that I want to show, but tell the query to just not show certian records.
Thanks
Dave
What I want is to only display the records that are not Rejected or Transferred. I thought it would be easier to have the SQL read
SELECT * FROM tbl WHERE Action <> "Rejected"
but when I try to add the other parameter it does not work. Like this...
SELECT * FROM tbl WHERE Action <> "Rejected" OR Action <> "Transferred"
The returned records show records that are rejected, but not ones transferred.
Can someone help. I am hoping that I do not have to list out all the parameters that I want to show, but tell the query to just not show certian records.
Thanks
Dave