error trapping on subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to error trap on a subform so after a date is filled a set number
of fields on the same record line need to be filled in otherwise the box will
be cleared and the required fileds highted in red.

I have achieved this for when on a single view form but cannot when there
are multilpe records in the subform linked the main?
 
You can use the BeforeUpdate event of the sub form to check if all the values
are filled, if not prompt a message

If IsNull(Me.[TextBoxNAme]) Then
MsgBox "Field must be filled"
Cancel = True ' process will be stoped
End If
 
Back
Top