twinupshot
Registered User.
- Local time
- Today, 19:42
- Joined
- Jan 10, 2002
- Messages
- 22
VB ".Visible" help
I have a report that I want to turn certain fields visible when a checkbox field on the form is checked. All of the following If..Then statements work fine by themselves but not together as you see here. I can't seem to figure out how one gets the code to keep executing the statements when the statement above it is "True".
Do I need an ElseIf in there somewhere?
Thanks!
_______________________________________________
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Interger)
If (Me.RII = True) Then
Me.RII.Visible = True
Else
Me.RII.Visible = False
If (Me.NDT = True) Then
Me.NDT.Visible = True
Else
Me.NDT.Visible = False
If (Me.Engine_print__1 = True) Then
Me.Ctl_1_Engine.Visible = True
Else
Me.Ctl_1_Engine.Visible = False
If (Me.Engine_print__2 = True) Then
Me.Ctl_2_Engine.Visible = True
Else
Me.Ctl_2_Engine.Visible = False
End If
End If
End If
I have a report that I want to turn certain fields visible when a checkbox field on the form is checked. All of the following If..Then statements work fine by themselves but not together as you see here. I can't seem to figure out how one gets the code to keep executing the statements when the statement above it is "True".
Do I need an ElseIf in there somewhere?
Thanks!
_______________________________________________
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Interger)
If (Me.RII = True) Then
Me.RII.Visible = True
Else
Me.RII.Visible = False
If (Me.NDT = True) Then
Me.NDT.Visible = True
Else
Me.NDT.Visible = False
If (Me.Engine_print__1 = True) Then
Me.Ctl_1_Engine.Visible = True
Else
Me.Ctl_1_Engine.Visible = False
If (Me.Engine_print__2 = True) Then
Me.Ctl_2_Engine.Visible = True
Else
Me.Ctl_2_Engine.Visible = False
End If
End If
End If