Disappearing criteria!

G

Guest

In a query I wrote the following in the 'Criteria' of a field called 'School':
[Enter School name or leave blank for all] Or Is Not Null

At first this worked & gave me the information on all of the Schools if the
user left the 'enter parameter' box blank.

I tried the same on another field (with a yes/no answer rather than text) in
the same query resulting in the query always giving data on all of the
Schools & 'yes' & 'no' regardless of whether the user specifed either 'yes'
or 'no' &/or a School.

I went back to only having the ...'Or Is Not Null' in the 'School' criteria
only & then it just wouldn't work. I closed the database & re-opened it; I
removed the 'Or Is Not Null' criteria & then re-entered it but I can't seem
to get it to work again.

I also tried instead to write in the criteria of 'School' the following:
Like [Enter School name or leave blank for all]
and then typed into the Or box:
[Enter School name or leave blank for all] Is Null

Weirdly this worked at first but then didn't & when I went back into Design
View the text in the 'Or' box had literally disappeared.
I re-typed it but when I saved & closed it & tried to run it again it didn't
work & when I went back to the design view the text in the 'Or' box had
disappeared again.

Please help! I have no idea what is going on!
Thanks
Heidi
 
G

Guest

Hurray it works, thank you!
That's been bugging me for most of the morning.

Rick B said:
Personally, I would use...

Like [Enter School name or leave blank for all] & "*"




--
Rick B



Spydii said:
In a query I wrote the following in the 'Criteria' of a field called 'School':
[Enter School name or leave blank for all] Or Is Not Null

At first this worked & gave me the information on all of the Schools if the
user left the 'enter parameter' box blank.

I tried the same on another field (with a yes/no answer rather than text) in
the same query resulting in the query always giving data on all of the
Schools & 'yes' & 'no' regardless of whether the user specifed either 'yes'
or 'no' &/or a School.

I went back to only having the ...'Or Is Not Null' in the 'School' criteria
only & then it just wouldn't work. I closed the database & re-opened it; I
removed the 'Or Is Not Null' criteria & then re-entered it but I can't seem
to get it to work again.

I also tried instead to write in the criteria of 'School' the following:
Like [Enter School name or leave blank for all]
and then typed into the Or box:
[Enter School name or leave blank for all] Is Null

Weirdly this worked at first but then didn't & when I went back into Design
View the text in the 'Or' box had literally disappeared.
I re-typed it but when I saved & closed it & tried to run it again it didn't
work & when I went back to the design view the text in the 'Or' box had
disappeared again.

Please help! I have no idea what is going on!
Thanks
Heidi
 

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