Yes/No field in Query

M

MikeB

I have a union query. One of the fields I'm trying to include in the
query is a Yes/No field.

In the Union Query, the field does not show as a little checkbox, but
rather as a field with a value of -1 for Yes and 0 for No. How do I
preserve the field type?

Here is the query:
SELECT [GameNumber], [MatchNumber], [White] as [PlayerNumber],
"White" as [Color], [Black] as [OpponentNumber], [WhiteScore] as
[Score], [Duration], [Moves], [Rated]
FROM [Games]
WHERE ( [IsBye] = No and [IsLesson] = No and [IsBeginnerClass] = No)

UNION SELECT [GameNumber], [MatchNumber], [Black] as [PlayerNumber],
"Black" as [Color],[White] as [OpponentNumber], [BlackScore] as
[Score], [Duration], [Moves], [Rated]
FROM [Games]
WHERE ( [IsBye] = No and [IsLesson] = No and [IsBeginnerClass] = No)

UNION SELECT [GameNumber], [MatchNumber], [White] as [PlayerNumber],
"Bye" as [Color], Null as [OpponentNumber], [WhiteScore] as [Score],
Null as [Duration], Null as [Moves], [Rated]
FROM [Games]
WHERE [IsBye] = Yes;
 
K

KARL DEWEY

How do I preserve the field type?
The field type is Boolean. The minus one and zero is how the data is stored.
Just select a check box for your form object.
 

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