Check-boxes and alternative text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have four check boxes. Only one of the boxes will be check for a given line
on a report. What I WANT is to *not* have the check-boxes on the report, but
some alternative text for what the checked box means.

For example, my report has a fragment that looks like this:

[] [] [x] [] (where only one is checked)

What I want is:

"text for checkbox 3" (instead of the FOUR checkboxes.)

How can I do this please?

Thanks!!
 
On the report replace the check box field with an unbound text box with the
control source
=IIf([mycheckbox] = True,"My Text","") This will print your selected text if
true (or checked) and it will be blank and not show if false (or unchecked).
If you want alternate text to show when unchecked insert it between the
quotes. You can do one text box for each check box.
 
I have four check boxes. Only one of the boxes will be check for a given line
on a report. What I WANT is to *not* have the check-boxes on the report, but
some alternative text for what the checked box means.

For example, my report has a fragment that looks like this:

[] [] [x] [] (where only one is checked)

What I want is:

"text for checkbox 3" (instead of the FOUR checkboxes.)

How can I do this please?

Thanks!!

Sure.
Use 4 Unbound controls instead of the check boxes.
Set their control source to the individual CheckBoxField
Set the Format Property to:
;"This is the text wanted";

Look up
Format Property + Number and Currency datatype.
Positive Value;Negative Value; Zero ; Null

Because the value of a check box is either -1 or Zero, the above
format will only display the text if the check box is checked.
 
I have four check boxes. Only one of the boxes will be check for a given line
on a report. What I WANT is to *not* have the check-boxes on the report, but
some alternative text for what the checked box means.

For example, my report has a fragment that looks like this:

[] [] [x] [] (where only one is checked)

What I want is:

"text for checkbox 3" (instead of the FOUR checkboxes.)

How can I do this please?

Thanks!!

Sure.
Use 4 Unbound controls instead of the check boxes.
Set their control source to the individual CheckBoxField
Set the Format Property to:
;"This is the text wanted";

Look up
Format Property + Number and Currency datatype.
Positive Value;Negative Value; Zero ; Null

Because the value of a check box is either -1 or Zero, the above
format will only display the text if the check box is checked.
 
I have four check boxes. Only one of the boxes will be check for a given line
on a report. What I WANT is to *not* have the check-boxes on the report, but
some alternative text for what the checked box means.

For example, my report has a fragment that looks like this:

[] [] [x] [] (where only one is checked)

What I want is:

"text for checkbox 3" (instead of the FOUR checkboxes.)

How can I do this please?

Thanks!!

Sure.
Use 4 Unbound controls instead of the check boxes.
Set their control source to the individual CheckBoxField
Set the Format Property to:
;"This is the text wanted";

Look up
Format Property + Number and Currency datatype.
Positive Value;Negative Value; Zero ; Null

Because the value of a check box is either -1 or Zero, the above
format will only display the text if the check box is checked.
 
I need to use the same section of the report for ALL FOUR of these boxes.
Since only one will EVER be checked, just reserving space for that text is
what I want. Does your method allow for that Fred?

Thanks!
 
I need to use the same section of the report for ALL FOUR of these boxes.
Since only one will EVER be checked, just reserving space for that text is
what I want. Does your method allow for that Fred?

Thanks!

You would have had your answer faster if you had simply tried it!
 
Pardon me,

You can use Fred's method by placing the four text boxes on top of each other
and making sure they are transparent.

Otherwise, you can use an UNBOUND textbox and some VBA code in the relevant
section. You will still need the checkboxes, but you can set there visible
properties to False so you don't see them on the report when it prints.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If me.ChkOne = true then
me.txtUnboundControl = "Some Text"

ElseIf me.ChkTwo = True then
me.txtUnboundControl = "Second level"

ElseIf me.ChkThree = True then
me.txtUnboundControl = "Three is level"

ElseIf me.ChkFour = True then
me.txtUnboundControl = "Something goes here"

Else
me.txtUnboundControl = Null
End If

End Sub
 
Back
Top