DaniBoy
Registered User.
- Local time
- Today, 09:51
- Joined
- Nov 18, 2001
- Messages
- 174
Hello Guys,
I am trying to make a lable change its caption on a Report depending on a check box, If the checkbox"REFUND" is Checked I want a label to have a caption of REFUND and if is Not Checked I want the Caption to be "CORRECTION FORM". Simple right? Well this is what I did on the OnPage Event:
Private Sub Report_Page()
If Me.Refund = True Then
Me.lblType.Caption = "Refund"
Else
Me.lblType.Caption = "Correction Form"
End If
End Sub
To things happen:
1)When the Caption on the lblType on the property sheet is blank I get a REFUND for True and Blank for False.
2)When I put CORRECTION FORM on the Caption of the lblType on the property sheet It shows the Correction Form when False and Refund when True.
I thought I had fixed the Problem, Well not quite, When I print a Report that has CORRECTION FORM on the screen, I get a REFUND on the hardcopy.
I dont know what am doing wrong, please explain to me..
Thanks
DaniBoy
PS. I did search before asking and found a post with the similar question, but it was just to make it visible or unvisible.
If(Me.Somefield=0) Then
Me.Somefield.Visible=False
Else
Me.Somefield.Visible=True
End If
in the on format event.
Or depending on the data type you could use the format option on the property sheet to set the fields fore colour to white, same thing different method.
I Dint Find any Format Event.
I am trying to make a lable change its caption on a Report depending on a check box, If the checkbox"REFUND" is Checked I want a label to have a caption of REFUND and if is Not Checked I want the Caption to be "CORRECTION FORM". Simple right? Well this is what I did on the OnPage Event:
Private Sub Report_Page()
If Me.Refund = True Then
Me.lblType.Caption = "Refund"
Else
Me.lblType.Caption = "Correction Form"
End If
End Sub
To things happen:
1)When the Caption on the lblType on the property sheet is blank I get a REFUND for True and Blank for False.
2)When I put CORRECTION FORM on the Caption of the lblType on the property sheet It shows the Correction Form when False and Refund when True.
I thought I had fixed the Problem, Well not quite, When I print a Report that has CORRECTION FORM on the screen, I get a REFUND on the hardcopy.
I dont know what am doing wrong, please explain to me..
Thanks
DaniBoy
PS. I did search before asking and found a post with the similar question, but it was just to make it visible or unvisible.
If(Me.Somefield=0) Then
Me.Somefield.Visible=False
Else
Me.Somefield.Visible=True
End If
in the on format event.
Or depending on the data type you could use the format option on the property sheet to set the fields fore colour to white, same thing different method.
I Dint Find any Format Event.
Last edited: