Hey everyone,
This will be my first post.
I am using Microsoft Access 2007 – 2010 on Widows 7 and am trying to run a query on a single table. I am getting this msg: Data type mismatch in criteria expression.
The column that I am trying to query is the tblNPI.Status column where I want the query to return any Status other than the status of pending.
Caveat: The table tblNPI is the main table and I have a second table called tblStatus that contains 16 different statuses. The main table field for Status is defined as a Lookup field where I can quickly use the drop down to select a status from the tblStatus table. (This is where I am suspecting my issue)
I have tried several different methods to no avail. Or instance in thee WHERE statement, I have tried (in the query design view mind you) of the Status field for criteria these: NOT “Pending”, <> “Pending”, Not [Pending] , <> [Pending], Not [“Pending”], Not [‘Pending’], <> ‘Pending’, Not [‘Pending’]
The query (in SQL view) looks like this for <>“Pending” in the design view:
SELECT tblNPI.NPI_ID, tblNPI.Customer, tblNPI.Assembly, tblNPI.JobNumber, tblNPI.Status
FROM tblNPI
WHERE (((tblNPI.Status)<>"Pending"));
I have four other fields called in this query as you can see in the code.
Thank you for your reviews in advance.