Hello,
I want to put code in the On Current event of a continuous subform on my main form so that when I click on different records and thus change what's shown in another subform right next to it, the second subform is hidden under certain conditions. Those conditions are the presence, or not, of data [a date] in an unbound text box on the main form (DDate) (actually, the source for that data is on that second subform, I just have it copied into the text box because I thought it might be easier to reference it that way).
But my code is definitely wrong for that; I always have trouble to correctly
reference other subforms and controls on them.
Private Sub Form_Current()
If Forms.Parent.DDate = Null Then
Forms.Parent.sfrmSpeakerCOI1.Visible = False
Forms.Parent.NoDisclosureTxt.Visible = True
Else
Forms.Parent.sfrmSpeakerCOI1.Visible = True
Forms.Parent.NoDisclosureTxt.Visible = False
End If
End Sub
Could somebody please take a look and tell me what I need to change?
Thank you.
I want to put code in the On Current event of a continuous subform on my main form so that when I click on different records and thus change what's shown in another subform right next to it, the second subform is hidden under certain conditions. Those conditions are the presence, or not, of data [a date] in an unbound text box on the main form (DDate) (actually, the source for that data is on that second subform, I just have it copied into the text box because I thought it might be easier to reference it that way).
But my code is definitely wrong for that; I always have trouble to correctly
reference other subforms and controls on them.
Private Sub Form_Current()
If Forms.Parent.DDate = Null Then
Forms.Parent.sfrmSpeakerCOI1.Visible = False
Forms.Parent.NoDisclosureTxt.Visible = True
Else
Forms.Parent.sfrmSpeakerCOI1.Visible = True
Forms.Parent.NoDisclosureTxt.Visible = False
End If
End Sub
Could somebody please take a look and tell me what I need to change?
Thank you.