I haven't used access in quite a while, but I believe you can control the
formatting of boolean fields in the schema edit form, down in the bottom
part where all the options are.  

If you're using an integer in a boolean context, the safest bet is always
comparing to zero, because zero is always the only false value, whereas true
can have multiple values.

SELECT *
FROM mytable
WHERE booleanfield <> 0

Cheers,
barneyb

> -----Original Message-----
> From: Jim McAtee [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 11, 2004 10:08 AM
> To: CF-Talk
> Subject: Access Question
>
> Off topic:  When a table is opened in Access in the
> spreadsheet-like view,
> sometimes a boolean Yes/No field appears as -1/0 and sometimes as
> checkboxes.  What controls this, and is it indicative in any
> way of how
> the data field itself is defined?
>
> On topic:  Is it always safe to do a query on an Access table
> through the
> MS ODBC drivers and test a Yes/No field using 1/0 rather than -1/0?  I
> realize why Access stores booleans that appear as -1.  What
> I'm wondering
> is if the ODBC layer masks this from the developer.
>
> SELECT *
> FROM mytable
> WHERE booleanfield = 1
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to