D
DJW
I have a main form called "frm_Main".
The main form has three tabbed pages.
Each page contains a subform (i.e. page1 has subform1, page 2 has subform2,
etc.)
My main form has a two labels (Label28 and Label40).
I am trying to write code to reference the labels on the main form when I
click on the page tab. What I'm trying to do is when I click on the tab to
page1, the Label28 is visible on the main form and label40 is not. When I
click on the tab to select page2, the opposite occurs... Label28 is not
visible an Label40 is.
Here is what I've tried so far with no success. I'm looking for correct
code reference to the label and the correct place to place the code.
Private Sub Form_GotFocus()
Forms![Frm_Main].[Label28].Visible = False
Forms![Frm_Main].[Label40].Visible = True
End Sub
Any help appreciated.
The main form has three tabbed pages.
Each page contains a subform (i.e. page1 has subform1, page 2 has subform2,
etc.)
My main form has a two labels (Label28 and Label40).
I am trying to write code to reference the labels on the main form when I
click on the page tab. What I'm trying to do is when I click on the tab to
page1, the Label28 is visible on the main form and label40 is not. When I
click on the tab to select page2, the opposite occurs... Label28 is not
visible an Label40 is.
Here is what I've tried so far with no success. I'm looking for correct
code reference to the label and the correct place to place the code.
Private Sub Form_GotFocus()
Forms![Frm_Main].[Label28].Visible = False
Forms![Frm_Main].[Label40].Visible = True
End Sub
Any help appreciated.