G
Guest
I have a check box field in my Main form called "PO_flag." On my subform, I
have a field called "PO_no". If the PO_flag field is "checked" (="Y"), the
PO_no field on the subform must be required (filled in). If not, the message
will be MsgBox "You must enter a PO#." I put the following code in the
Before Update Event procedure but nothing happens. Do I also need code in
the subform under the PO_no field?
Private Sub Check161_BeforeUpdate(Cancel As Integer)
If Me!PO_flag = "Y" Then
MsgBox "You are required to enter a Purchase Order # in the line-item
detail section."
Me!PO_flag.SetFocus
Cancel = True
End If
End Sub
Thank you!
have a field called "PO_no". If the PO_flag field is "checked" (="Y"), the
PO_no field on the subform must be required (filled in). If not, the message
will be MsgBox "You must enter a PO#." I put the following code in the
Before Update Event procedure but nothing happens. Do I also need code in
the subform under the PO_no field?
Private Sub Check161_BeforeUpdate(Cancel As Integer)
If Me!PO_flag = "Y" Then
MsgBox "You are required to enter a Purchase Order # in the line-item
detail section."
Me!PO_flag.SetFocus
Cancel = True
End If
End Sub
Thank you!