Displaying values in a label on a Report using a checkbox

  • Thread starter Thread starter rupelo
  • Start date Start date
R

rupelo

Good morning all,

I have a small problem and it goes like this

I have a database which is to store peoples information. Once the
information is stored I want it to print out certain fields which have
been stored, on a card. However I am getting problems with one field
itself.

To store the class I have seven check boxes to select the different
classes, 1 throgh 7. A person could have more than one class. the check
boxes names are d602-class1 to d602-class7.

Now I have set up on my report seven labels in which to display the
corresponding class number.

I use this code to display the value

if d602-class1 = -1 Then
Me. label1.caption = "1"
Else
Me.label1.caption = ""
End if

I put it in the OnPrint even Property of the report, However nothing
shows up in the label when the check boxes have been checked.

Any assistance would be much appreciated with this problem
 
You may need to add to the report a hidden control bound to d602-class1.
However, if that is the name of the field or control, you should use syntax
something like:
If Me.[d602-class1] = -1
The dash may be interpreted as a subtraction operator otherwise.
 

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

Back
Top