Access 2002 query

M

[MVP] S.Clark

A checkbox is a Yes/No field, which can either be True or False.

Any the following would work:

Select [FieldnameList] from [Tablename] WHERE [SomeYesNoField] = FALSE
Select [FieldnameList] from [Tablename] WHERE [SomeYesNoField] <> TRUE
Select [FieldnameList] from [Tablename] WHERE NOT [SomeYesNoField]
 
T

Trisha

Here is what I came up with and I'm getting a syntax error.

Select [ysnFollowUpComplete] from [TblEmerPatientComplaint] WHERE
[ysnFollowUpComplete] = FALSE

my field is ysnFollowUpComplete and my table is TblEmerPatientComplaint

What am I doing wrong?

[MVP] S.Clark said:
A checkbox is a Yes/No field, which can either be True or False.

Any the following would work:

Select [FieldnameList] from [Tablename] WHERE [SomeYesNoField] = FALSE
Select [FieldnameList] from [Tablename] WHERE [SomeYesNoField] <> TRUE
Select [FieldnameList] from [Tablename] WHERE NOT [SomeYesNoField]

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

Trisha said:
How do I define a query where the checkbox field is empty?
 
J

John Spencer (MVP)

Hard to say. It looks correct, so guessing -

-- ysnFollowUpComplete is not a Yes/No field but a text field

-- There is a hidden character in the SQL statement. Did you by any chance cut
and paste from the newsgroup and then modify it for table and field names?
Sometimes that picks up an invisible character that can cause a problem. If you
did, try opening a new query and entering the SQL statement directly.


Here is what I came up with and I'm getting a syntax error.

Select [ysnFollowUpComplete] from [TblEmerPatientComplaint] WHERE
[ysnFollowUpComplete] = FALSE

my field is ysnFollowUpComplete and my table is TblEmerPatientComplaint

What am I doing wrong?

[MVP] S.Clark said:
A checkbox is a Yes/No field, which can either be True or False.

Any the following would work:

Select [FieldnameList] from [Tablename] WHERE [SomeYesNoField] = FALSE
Select [FieldnameList] from [Tablename] WHERE [SomeYesNoField] <> TRUE
Select [FieldnameList] from [Tablename] WHERE NOT [SomeYesNoField]

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

Trisha said:
How do I define a query where the checkbox field is empty?
 
Top