noboffinme
11-11-2009, 11:09 PM
Hello
I am writing a query where I have to exclude a set of id numbers located in a previously created query.
I have two tables - Sheet1 & Sheet2.
Each has 2 fields - id_number & Product
So my logic is to add a line in the Access Query Builder as follows;
In the id number field of this second query, I have added a line to select only records not equal to this first query, here's what I mean.
The Criteria line in the Query builder for the field [Sheet2]. has this script added -
<> [Sheet1].[id_number]
I have also used 'Not Like' instead of '<>' but get the same result.
What's happening is I get [I]NO results for this query when my test data should show some results.
Somehow, I am filtering out all the data??
Anyone aware of what I'm doing wrong?
Thanks in advance, : )
I am writing a query where I have to exclude a set of id numbers located in a previously created query.
I have two tables - Sheet1 & Sheet2.
Each has 2 fields - id_number & Product
So my logic is to add a line in the Access Query Builder as follows;
In the id number field of this second query, I have added a line to select only records not equal to this first query, here's what I mean.
The Criteria line in the Query builder for the field [Sheet2]. has this script added -
<> [Sheet1].[id_number]
I have also used 'Not Like' instead of '<>' but get the same result.
What's happening is I get [I]NO results for this query when my test data should show some results.
Somehow, I am filtering out all the data??
Anyone aware of what I'm doing wrong?
Thanks in advance, : )