Changing criteria in a query

  • Thread starter Thread starter Brandon
  • Start date Start date
B

Brandon

Hello all:

Using Access 2000.

I trying to figure out a way to put the the criteria 'Not
Is Null' in field's criteria field in a query . I have
the criteria for this field pointing to a text box on a
form. If I try just putting the words NOT IS NULL in the
text box and run the query, it comes up with nothing.

I created a record that contained the words "Is Not Null"
in the field, and the query then came up with that
record. So, it is looking for the Text "Is Not Null".
Is there a way to put a value in that text box to make
the criteria not look for the text "is Not Null" and just
pick all the records that don't contain null?

Any help or insight would be greatly appreciated.

Thanks in advance.

Brandon
 
Brandon said:
Hello all:

Using Access 2000.

I trying to figure out a way to put the the criteria 'Not
Is Null' in field's criteria field in a query . I have
the criteria for this field pointing to a text box on a
form. If I try just putting the words NOT IS NULL in the
text box and run the query, it comes up with nothing.

The correct Syntax is

IS NOT NULL

not

NOT IS NULL
 
Rick,

Tried this solutions but it is still just looking for the
text "Is Not Null" as opposed to the argument that is
should find all records that contain something in the
field.


Any more suggestions?

Thanks in advance.

Brandon
 
brandon said:
Rick,

Tried this solutions but it is still just looking for the
text "Is Not Null" as opposed to the argument that is
should find all records that contain something in the
field.

You don't have quotes around the criteria do you?
 
Rick,

No, I don't put any quotes around the criteria. In the
query, in the criteria of the field "StoreNo" I have: =
[Forms]![frmReports]![txtStoreNo]. This pulls whatever
is in the txtStoreNo field on the report frmReports. I
have coding on that form that if they leave the
txtStoreNo field empty, that the value should be changed
to "Is Not Null". When I run this, I get no result.

I tested a hunch that I had, and put a record in my table
that that had the text "Is Not Null" in the StoreNo
field. Then when I ran the report again from the Report
form and left the StoreNo blank, it did find the above
record. So, when I set that text box on the form, and
that text box gets assigned to the criteria in the query,
it is putting the "Is Not Null" as a text entry.

Any ideas? I'm running out of them here.

Thanks again.

Brandon
 
Back
Top