access checking of booleans in select statement

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

if i have a table like this

ID Name Accessable
1 Me yes

in access with accessable as a yes/no field (or a boolean) how do i write a
statement in ado.net to check that? obviously yes or no wont work in a query
builder for criteria... it kicks it out...

i had select users.* from users where accessable = yes but that was kicked
out in vb.net useing the dataadapter's query builder... how do i check to
see if accessable is true in a select statement? thanks
 
Use True/False.
The Access Yes/No is just an alias for these regular commands.

You can also use the real values 0 is False and <>0 is True.
(Access uses -1 for True, SQL Server uses 1.)

e.g. If you want accessable = yes use:
accessable = True
or
accessable <> 0
 
thanks

Joe Fallon said:
Use True/False.
The Access Yes/No is just an alias for these regular commands.

You can also use the real values 0 is False and <>0 is True.
(Access uses -1 for True, SQL Server uses 1.)

e.g. If you want accessable = yes use:
accessable = True
or
accessable <> 0
--
Joe Fallon
Access MVP



write
 
Back
Top