Displaying Boolean as Text

I

Irene Jefferies

I have boolean fields and would like them to be displayed
as if True = Y instead of a checkbox. Can anyone advise
on how to accomplish this in the query grid.
Thx,
iej
 
A

Allen Browne

Open your form/report in design view.
Delete the check box.
Open the Toolbox (View menu).
Click the text box icon.
Open the Field list (View menu).
Drag the yes/not field onto your form or report.

At this point, Access puts a text box on your form to represent the yes/no
field. Right-click it, and choose Properties. In the Format property (Format
tab of the Properties box), you will see:
Yes/No
and the text in the box will read "Yes" or "No".

If you want the box to display Y or N, you can set the Format property to:
\N;\Y
This will display the Y or N until the focus moves into the box, but then
the user will need to enter -1 for Yes, or 0 for No.
 
T

tina

-----Original Message-----
I have boolean fields and would like them to be displayed
as if True = Y instead of a checkbox. Can anyone advise
on how to accomplish this in the query grid.
Thx,
iej
.
two ways i can think of to do it in the query grid, to
show the results in datasheet view:

#1
pull the boolean field into the grid.
right click on the Field name in the grid and click
Properties on the shortcut menu.
on the General tab, enter Format as \N;\Y
on the Lookup tab, enter Display Control as Text Box from
the droplist.
to change data in datasheet view, you must enter 0 or -1.

#2
create a calculated field in the query grid, as
Expr1: IIf([BooleanField],"Y","N")
because this is a calculated field, you can't change data
in datasheet view.
 

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