Boolean Question

K

knowshowrosegrows

I am SO NOT GETTING Yes/No Fields.

Can someone tell me like I'm a six year-old how to create a field in a table
and a control in a form that will ultimately display in a report the
distiction of "Passed" or "Failed?"
 
F

fredg

I am SO NOT GETTING Yes/No Fields.

Can someone tell me like I'm a six year-old how to create a field in a table
and a control in a form that will ultimately display in a report the
distiction of "Passed" or "Failed?"


If you do have a Yes/No field you could use an unbound text control in
your report.
Set it's control source to the Yes/No field.

Then set it's Format property to:
;"Passed";"Failed";

The above assumes Yes (-1) means "Passed" and No (0) means "Failed".
or.....
You could also just use an Unbound control with it's control source
set to:

=IIf([YesNoField]=-1,"Passed","Failed")
 
J

Jeff Boyce

First, the underlying data.

Is the field in the table of type Yes/No?

A control on a form is merely a window to the data in the table. Forms are
not reports.

You can put an unbound control on a report in design view, and set the
Control Source property of that control to something like (untested):

=IIF([YourYesNoField] = True, "Passed","Failed")

I'll assume you intend to have this show in a Detail section, so each record
has it's own "Passed" or "Failed".

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jeff Boyce

Oooh, nice idea, Fred. I keep forgetting about using that Format
property...

Jeff B.
fredg said:
I am SO NOT GETTING Yes/No Fields.

Can someone tell me like I'm a six year-old how to create a field in a
table
and a control in a form that will ultimately display in a report the
distiction of "Passed" or "Failed?"


If you do have a Yes/No field you could use an unbound text control in
your report.
Set it's control source to the Yes/No field.

Then set it's Format property to:
;"Passed";"Failed";

The above assumes Yes (-1) means "Passed" and No (0) means "Failed".
or.....
You could also just use an Unbound control with it's control source
set to:

=IIf([YesNoField]=-1,"Passed","Failed")
 

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