G
Guest
When writing the VBA code, how do you refer to a child form when there are
more than one on a form?
My parent form is called frm_Vendor and the subform I need to reference is
called subfrm_Application. I am trying to create a business rule that says
if Vendor_Nbr on the parent is null and Status_Code = Waiting List, then
Application_Request_Date on the subform is required.
I tried the following in the Parent form's afterUpdate event and also tried
it on the subfrm_Application afterupdate event (I don't really know if it's
where it is supposed to go) and get a 424 Object Required error. (I also
tried using subfrm_Application.Application_Request_Date and it didn't work
either)
If (Me.Vendor_Nbr = "0" And Me.Status_Code = "Waiting List" And
IsNull(Child.Application_Request_Date = True)) Then
MsgBox "An Application Request Date is required when Vendor Number is 0."
Cancel = True
End If
Thanks for your help!
more than one on a form?
My parent form is called frm_Vendor and the subform I need to reference is
called subfrm_Application. I am trying to create a business rule that says
if Vendor_Nbr on the parent is null and Status_Code = Waiting List, then
Application_Request_Date on the subform is required.
I tried the following in the Parent form's afterUpdate event and also tried
it on the subfrm_Application afterupdate event (I don't really know if it's
where it is supposed to go) and get a 424 Object Required error. (I also
tried using subfrm_Application.Application_Request_Date and it didn't work
either)
If (Me.Vendor_Nbr = "0" And Me.Status_Code = "Waiting List" And
IsNull(Child.Application_Request_Date = True)) Then
MsgBox "An Application Request Date is required when Vendor Number is 0."
Cancel = True
End If
Thanks for your help!