Refer to Subform

  • Thread starter Thread starter CC
  • Start date Start date
C

CC

I want to hide the subform on a main form until the user enters a date.
Using the code below I get the Run-time error 424 "Object required" Can
anyone debug my code:

If Forms!Frm_EnterRenewalsReceived!ReceivedDate Is Null Then
Forms.Frm_EnterRenewalsReceived.SubFrm_RenewalsReceived1.Visible False
End If
 
If you are on the main form, the current event code would be:

me![SubFrm_RenewalsReceived1].Form.Visible= Not IsNull(me!ReceivedDate)
end sub
 
Hi, CC.

Give this a try:

If IsNull(me.ReceivedDate) Then
Forms!Frm_EnterRenewalsReceived!SubFrm_RenewalsReceived1.Visible = False
End If
 
Back
Top