Help

Rupelo

New member
Local time
Yesterday, 20:51
Joined
Nov 21, 2006
Messages
8
Ok, this is my problem. I have a form with seven checkboxes which corrispond to the number one through seven. What I would like to do is, when i generate my report have the number display instead of the check box. For example, if i have the check boxes for 3 and 5 checked, on my report I would see the numbers 3 and 5 separated by a comma.

I was given this piece of code to use for it however it is not letting me. it tells me I cant set that value. This is the code i typed in. also they said to put it in the Onprint part but nothing still

Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
If d602 - class3 = -1 Then
Me.Text70 = "1"
Else
Me.Text70 = ""
End If

End Sub

Any help will be greatly appreciated as my boss is chewing my arse and this is the last thing i need to do
 
Help is not a suitable heading, you'll pretty much get ignored
Last line is perhaps inappropriate..
However,
What are the names of your check boxes?
 
might be trying to write into text boxes. do it with labels instead, but you need the caption property

hence

If d602 - class3 = -1 Then
Me.label70 .caption= "1"
Else
Me.label70.caption = ""
End If

also not sure what d602 - class3 resolves, but i assume the syntax is ok for what you are doing
 
Ok i understand the caption property but what I am not getting is where to put the code itself. One was saying that I put it in the OnPrint part.... but nothing is displaying in the labels.

d602-class3 is the name of one of the checkboxes.

Any thoughts ont his would be welcome
 
right i see - this will be clearer then

If [d602-class3] = true Then
label70.caption= "1"
Else
label70.caption = ""
End If

for this to work, [d602-class3] needs to be a check box in the groupheader0section, and the label needs to be in the groupheader0 section also
 

Users who are viewing this thread

Back
Top Bottom