M
Morris
The form is linked to a table, with four records. Each record needs to
have three fields updated (by a user who types text into the textfield)
I want it to error and not close the form if all three text fields in
_all_four_records are not populated and that's where I stop.
Private Sub Form_Unload(Cancel As Integer)
If IsNull(Me.txtField1.Value) Or IsNull(Me.txtField2.Value) Or _
IsNull(Me.txtField3.Value) Then
MsgBox "Not all of the three required fields have been
populated!", vbCritical, "Cannot continue"
Cancel = True
End If
Now, it means that if user populates all three fields but just on one
page (record) the code will allow him to close the form, and I want it
to be able to check those fields for all pages (records).
Any help greatly appreciated,
Morris
have three fields updated (by a user who types text into the textfield)
I want it to error and not close the form if all three text fields in
_all_four_records are not populated and that's where I stop.
Private Sub Form_Unload(Cancel As Integer)
If IsNull(Me.txtField1.Value) Or IsNull(Me.txtField2.Value) Or _
IsNull(Me.txtField3.Value) Then
MsgBox "Not all of the three required fields have been
populated!", vbCritical, "Cannot continue"
Cancel = True
End If
Now, it means that if user populates all three fields but just on one
page (record) the code will allow him to close the form, and I want it
to be able to check those fields for all pages (records).
Any help greatly appreciated,
Morris