Help with QBF CheckBox Query

R

robboll

using Access 2003

Query with a column called [Job Code]

Have a checkbox on the form. When it's checked I want it to show only
those records where [Job Code] is blank (or null). If it's not
checked it should show everything.

My query criteria is as follows:
Like IIf([forms]![frmCandidatelist]![chkAvailable]=-1,Like Null,"*")

but it doesn't work.

Thanks in advance if you see the problem!

RBollinger
 
J

Jeff Boyce

If the data type (in the table) of the underlying data "behind" that control
on that form (it all STARTS with the data) is a Yes/No type, then you need
to test for yes or no, not for null.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

Krzysztof Naworyta

Juzer robboll <[email protected]> napisa³


(...)
| Query with a column called [Job Code]
|
| Have a checkbox on the form. When it's checked I want it to show only
| those records where [Job Code] is blank (or null). If it's not
| checked it should show everything.
|
| My query criteria is as follows:
| Like IIf([forms]![frmCandidatelist]![chkAvailable]=-1,Like Null,"*")
|
| but it doesn't work.


Nothing is "Like Null" (!)

But it is difficult to obtain in the QBE.
QBE is just such a translator to SQL, so open your query in SQL View and
type as follows:

Select ...
From ...
Where
(
Forms!frmCandidatelist!chkAvailable=0
OR
[Job Code] Is NULL
)
 

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