= and <> not working as expected

B

Bill Lentz

I have a database that is in dbaseIV format. I'm linking it into an
access database. There is a field in the dbIV file called "slush" and
it comes in defined as text with a length of one. The field is either
blank, or contains a "Y". I want to run a query that selects all
records without a Y.

If I use the expression "= Y" in the query I get all the records with
a Y. However, if I use the expression "<> Y", I get no records, even
though about 2/3's of the records don't contain a Y.

What am I missing?

Thanks
Bill
 
C

Cheryl Fischer

The correct way to enter the expressions would be:

= "Y" for all records which are equal to Y

and

<> "Y" for all records which do not equal Y


hth,
 
B

Bill Lentz

The correct way to enter the expressions would be:

= "Y" for all records which are equal to Y

and

<> "Y" for all records which do not equal Y


hth,

Thanks for the response - that is what I have been entering, with no
luck on the <> "Y".

Bill
 
C

Cheryl Fischer

Are the records which fail to return in your query for not equal to "Y"
records where the field is null? You could insert the following into the
first row of an empty column:

NZ([MyField],"")

and, in the Criteria: row for that column insert:

<> "Y"

hth,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top