Randomblink
The Irreverent Reverend
- Local time
- Yesterday, 18:02
- Joined
- Jul 23, 2001
- Messages
- 279
Ok...
I have a LONG drawn out process for this and I am sure that there is an easier way to take care of this without writing thousands of lines of code...
I currently have about 10 fields and their labels that need to disappear and reappear...
5 of them are Alternate Mailing Fields and their labels...
The other 5 are Main Mailing Fields and their labels...
What I want to do is write a procedure/sub/function that will pop them in and out as called...
What I have now is a line of code that looks like this...
Private Sub Alternate_Hide()
Field1.Visible = True
lbl_Field1.Visible = True
Field2.Visible = True
lbl_Field2.Visible = True
Field3.Visible = True
lbl_Field3.Visible = True
Field09.Visible = False
lbl_Field09.Vixible = False
Field08.Visible = False
lbl_Field08.Vixible = False
Field07.Visible = False
lbl_Field07.Vixible = False
End Sub
Then I reverse the procedure and call it:
Private Sub Main_Mailing()
and I reverse the false and true statements...
Is there anyway that I could set it so that...
If X.visible = True
X.Visible = False
???
I get lost in coding like that...
If someone could help me out it would be greatly appreciated....
The thing is, this is only for looks right now...and to shorten the code would be nice, besides I see future uses for such a code...
Thanks ahead of time...
I have a LONG drawn out process for this and I am sure that there is an easier way to take care of this without writing thousands of lines of code...
I currently have about 10 fields and their labels that need to disappear and reappear...
5 of them are Alternate Mailing Fields and their labels...
The other 5 are Main Mailing Fields and their labels...
What I want to do is write a procedure/sub/function that will pop them in and out as called...
What I have now is a line of code that looks like this...
Private Sub Alternate_Hide()
Field1.Visible = True
lbl_Field1.Visible = True
Field2.Visible = True
lbl_Field2.Visible = True
Field3.Visible = True
lbl_Field3.Visible = True
Field09.Visible = False
lbl_Field09.Vixible = False
Field08.Visible = False
lbl_Field08.Vixible = False
Field07.Visible = False
lbl_Field07.Vixible = False
End Sub
Then I reverse the procedure and call it:
Private Sub Main_Mailing()
and I reverse the false and true statements...
Is there anyway that I could set it so that...
If X.visible = True
X.Visible = False
???
I get lost in coding like that...
If someone could help me out it would be greatly appreciated....
The thing is, this is only for looks right now...and to shorten the code would be nice, besides I see future uses for such a code...
Thanks ahead of time...