Hide control if Subform (1 Viewer)

Gismo

Registered User.
Local time
Today, 14:43
Joined
Jun 12, 2017
Messages
1,298
Hi,

Please assist with the correct code.
I want to hide a control in a sub form if a value in another sub form is met.

If Me.Form![Sanction]![AH Sanctioned] = False Then
Me.AHGApproval.Visible = True
Else
Me.AHGApproval.Visible = False
End If

End Sub
 

Gismo

Registered User.
Local time
Today, 14:43
Joined
Jun 12, 2017
Messages
1,298
AH Sanctioned is a control in the subform Sanction
AHGApproval is a control in the current subform

both sub forms are in the form EditSP
 

Minty

AWF VIP
Local time
Today, 12:43
Joined
Jul 26, 2013
Messages
10,354
Okay using the link provided that would work out something like ;

Code:
Me.AHGApproval.Visible =  Not Forms!EditSP!Sanction.Form![AH Sanctioned]

This assumes that the sub form control for form Sanction is called Sanction

Note that this is the control that contains the subform, NOT the subform name.
 

Users who are viewing this thread

Top Bottom