Refer to Subform

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
 
D

Damon Heron

If you are on the main form, the current event code would be:

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

Mr. B

Hi, CC.

Give this a try:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top