Conditional formatting of checkbox value

G

gweasel

I've got a form (Logbook) that has a check box to show when a
particular job has passed through all departments and is completed
(chk_complete). I also have a report (Workorder) with a header
section already in use, that I would like to add a box to in the very
top of the header that will read "Production" if [chk_complete] is not
checked, or will read "Completed" if [chk_complete] has been
clicked.

How can I make this work? If I put the bound text box along the top
of the report with the value for [chk_complete], of course it displays
either a "-1" or "0" depending on whether it was checked/unchecked.

Samples are appreciated. Or, if there is an easier way to do this,
I'll give it a shot. I guess the short question is how do I make a
check box value display as 1 of two strings depending on whether the
check box is checked/unchecked.

Thanks in advance.
Rick
 
F

fredg

I've got a form (Logbook) that has a check box to show when a
particular job has passed through all departments and is completed
(chk_complete). I also have a report (Workorder) with a header
section already in use, that I would like to add a box to in the very
top of the header that will read "Production" if [chk_complete] is not
checked, or will read "Completed" if [chk_complete] has been
clicked.

How can I make this work? If I put the bound text box along the top
of the report with the value for [chk_complete], of course it displays
either a "-1" or "0" depending on whether it was checked/unchecked.

Samples are appreciated. Or, if there is an easier way to do this,
I'll give it a shot. I guess the short question is how do I make a
check box value display as 1 of two strings depending on whether the
check box is checked/unchecked.

Thanks in advance.
Rick

Because a check box value is a Number, you can take advantage of a
control's format property to display the text.

Add an unbound TEXT control to the header.
Set it's control source to
= [NameOfCheckField]
Set it's format property to:
;"Completed";"Production";

In Access Help, look up
Format property + Number and Currency datatype
to see why this works.
 
G

gweasel

I've got a form (Logbook) that has a check box to show when a
particular job has passed through all departments and is completed
(chk_complete). I also have a report (Workorder) with a header
section already in use, that I would like to add a box to in the very
top of the header that will read "Production" if [chk_complete] is not
checked, or will read "Completed" if [chk_complete] has been
clicked.
How can I make this work? If I put the bound text box along the top
of the report with the value for [chk_complete], of course it displays
either a "-1" or "0" depending on whether it was checked/unchecked.
Samples are appreciated. Or, if there is an easier way to do this,
I'll give it a shot. I guess the short question is how do I make a
check box value display as 1 of two strings depending on whether the
check box is checked/unchecked.
Thanks in advance.
Rick

Because a check box value is a Number, you can take advantage of a
control's format property to display the text.

Add an unbound TEXT control to the header.
Set it's control source to
= [NameOfCheckField]
Set it's format property to:
;"Completed";"Production";

In Access Help, look up
Format property + Number and Currency datatype
to see why this works.

Bless the easy answers. Thanks Fred. Works like a charm.
 

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