Help with QBF CheckBox Query

  • Thread starter Thread starter robboll
  • Start date Start date
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
 
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
 
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
)
 
Back
Top