trying to reference tab on subform

BennyLinton

Registered User.
Local time
Today, 12:59
Joined
Feb 21, 2014
Messages
263
I have a field I need to reference from my subform's tab's control to my main form like:

If MainForm.... Tab... Control = 2 Then
Mainform.Label1.Visible = True

Here are the names of the forms/controls in their hierarchy:

frmMain
frmSubFormCosts
tabFurniture
txtValue

what would be a syntax that would work? Thanks! Benny
 
on the frmMain form you can check if TabControl->Page 2 is selected:

Private Sub Form_Current()
' Label1 refers the Label control to hide
' in the frmMain
Me.Label1.Visible = (Me.TabControl0.Value <> 2)

End Sub


Now on the Change Event of your TabControl:


Private Sub TabControl0_Change()
Call Form_Current
End Sub
 

Users who are viewing this thread

Back
Top Bottom