Format Yes/No in Union

C

CJ

Hi Groupies

I have a union query that combines 2 yes/no fields. When I run the query, I
get -1 and 0 instead of Yes and No.
How can I force the formatting to Yes and No?
 
J

John W. Vinson

Hi Groupies

I have a union query that combines 2 yes/no fields. When I run the query, I
get -1 and 0 instead of Yes and No.
How can I force the formatting to Yes and No?

By displaying the results of the Union query on a Form or Report, with the
formatting of the textbox set appropriately.

Query datasheets are of *very* limited utility and should not be used for data
presentation.

John W. Vinson [MVP]
 
C

CJ

John W. Vinson said:
By displaying the results of the Union query on a Form or Report, with the
formatting of the textbox set appropriately.

Query datasheets are of *very* limited utility and should not be used for
data
presentation.

John W. Vinson [MVP]

Hi John

I have the results showing up in a combo box and I was hoping to have that
column read yes/no instead of -1/0. Is there no way to change it for the
combo? I do have an alternative but this would be my preferred method.
 
J

John W. Vinson

I have the results showing up in a combo box and I was hoping to have that
column read yes/no instead of -1/0. Is there no way to change it for the
combo? I do have an alternative but this would be my preferred method.

One thing you could try is to set the Format property of the query field to
Yes/No. Or, you could use a calculated field in the query:

ShowYesNo: IIf([yesnofield], "Yes", "No")

and display that in the combo rather than the raw yes/no field.

John W. Vinson [MVP]
 
C

CJ

John W. Vinson said:
I have the results showing up in a combo box and I was hoping to have that
column read yes/no instead of -1/0. Is there no way to change it for the
combo? I do have an alternative but this would be my preferred method.

One thing you could try is to set the Format property of the query field
to
Yes/No. Or, you could use a calculated field in the query:

ShowYesNo: IIf([yesnofield], "Yes", "No")

and display that in the combo rather than the raw yes/no field.

John W. Vinson [MVP]


Setting the Format Property does not work, thus my posting.
I will give the calculation a try otherwise I will use my alternative.

Thanks John!
 

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

Similar Threads

Union Query 4
Union Query Help 0
UNION, WHERE or Something else? 3
Union Query 2
Union Queries and Foreign Keys 10
Union Crosstab Queries 1
date format lost in UNION query 4
yes/no field format 1

Top