Espinoza84
Registered User.
- Local time
- Today, 13:23
- Joined
- May 30, 2008
- Messages
- 55
Hello I am attaching a screenshot of my code and the design view of the sub_report.
I am not sure why it is not working?
I am trying to accomplish this:
the textbox named Application has a control source of Application.
if the result is LAN, then I want it to hide a textbox and a label while displaying a different textbox and a different label. Eventually I would like to expand the code here, to hide and display other textboxes and labels as the result of the SOURCE Application changes, because there is about 18 different results for this source (LAN, etc etc etc)
I am trying this boolean code as someone advised me it, though at first I was doing a longer version like this: (with same error)
Me.Text29.Visible = False
Me.Text31.Visible = False
Me.Label30.Visible = False
Me.Label32.Visible = False
If Me.Application = "LAN" Then
Me.Text29.Visible = True And Me.Label30.Visible = True And Me.Text31.Visible = False And Me.Label32.Visible = False
Else
If Me.Application = "ECO" Then
Me.Text31.Visible = True And Me.Label32.Visible = True And Me.Text29.Visible = False And Me.Label30.Visible = False
Else
Me.Text29.Visible = False
Me.Text31.Visible = False
Me.Label30.Visible = False
Me.Label32.Visible = False
End If
End If
Can someone help me out please? Thank you.
I am not sure why it is not working?
I am trying to accomplish this:
the textbox named Application has a control source of Application.
if the result is LAN, then I want it to hide a textbox and a label while displaying a different textbox and a different label. Eventually I would like to expand the code here, to hide and display other textboxes and labels as the result of the SOURCE Application changes, because there is about 18 different results for this source (LAN, etc etc etc)
I am trying this boolean code as someone advised me it, though at first I was doing a longer version like this: (with same error)
Me.Text29.Visible = False
Me.Text31.Visible = False
Me.Label30.Visible = False
Me.Label32.Visible = False
If Me.Application = "LAN" Then
Me.Text29.Visible = True And Me.Label30.Visible = True And Me.Text31.Visible = False And Me.Label32.Visible = False
Else
If Me.Application = "ECO" Then
Me.Text31.Visible = True And Me.Label32.Visible = True And Me.Text29.Visible = False And Me.Label30.Visible = False
Else
Me.Text29.Visible = False
Me.Text31.Visible = False
Me.Label30.Visible = False
Me.Label32.Visible = False
End If
End If
Can someone help me out please? Thank you.