I have a subform that I want to make inaccessible (either invisible or disabled) based on the value of a field on the main form. I have tried this code, but it doesn't seem to work. Any ideas?
Private Sub Form_Activate()
If Forms!frmAQApplicants!StillInField = "No" Then
Me!sbfAQInviteeList!InviteeList.Enabled = False
Me!sbfAQInviteeList!InviteeList.Visible = False
Else
Me!sbfAQInviteeList!InviteeList.Enabled = True
End If
End Sub
PS-the other important part of this is the event that triggers it...I'd like this to happen whenever the form is open/active to prevent data entry into the subform.
Thanks!
Private Sub Form_Activate()
If Forms!frmAQApplicants!StillInField = "No" Then
Me!sbfAQInviteeList!InviteeList.Enabled = False
Me!sbfAQInviteeList!InviteeList.Visible = False
Else
Me!sbfAQInviteeList!InviteeList.Enabled = True
End If
End Sub
PS-the other important part of this is the event that triggers it...I'd like this to happen whenever the form is open/active to prevent data entry into the subform.
Thanks!