D
djh0120
Hi,
I have a main form named Orders and a subform named Qty Form. I have a field
on Orders named Rev Level and one on the subform named RevLevel. The one on
Orders is an invisible field and is there for purposes of comparison. I want
to put code in the After_Update event of the RevLevel field in the Qty Form
that compares what is entered in the RevLevel field on the Qty Form against
what is entered in the Rev_Level field in the Orders form. If the two fields
don't match, I want to bring up a message box that says the fields don't
match, notify the quality manager and won't save the record at that time.
Below is what I have written but it won't work.
Private Sub RevLevel_AfterUpdate()
If Me.RevLevel = Forms.Orders.Rev_Level Then
Me.Date_Due.SetFocus
Else
MsgBox "This revision level does not match the revision level on file.
Notify the Quality Manager of this discrepancy. This record cannot be saved
at this time."
DoCmd.Close
End If
End Sub
Any help in resolving this would be appreciated.
djh0120
I have a main form named Orders and a subform named Qty Form. I have a field
on Orders named Rev Level and one on the subform named RevLevel. The one on
Orders is an invisible field and is there for purposes of comparison. I want
to put code in the After_Update event of the RevLevel field in the Qty Form
that compares what is entered in the RevLevel field on the Qty Form against
what is entered in the Rev_Level field in the Orders form. If the two fields
don't match, I want to bring up a message box that says the fields don't
match, notify the quality manager and won't save the record at that time.
Below is what I have written but it won't work.
Private Sub RevLevel_AfterUpdate()
If Me.RevLevel = Forms.Orders.Rev_Level Then
Me.Date_Due.SetFocus
Else
MsgBox "This revision level does not match the revision level on file.
Notify the Quality Manager of this discrepancy. This record cannot be saved
at this time."
DoCmd.Close
End If
End Sub
Any help in resolving this would be appreciated.
djh0120