Slight alteration to code needed

B

Bob

This code stops the record from being saved unless OwnerID has data, But if
I open the form later and delete data out of ownerID the record still saves,
Can I get a warning "Caution This Record has No OwnerID"
Thanks for any help.........Bob
--
Private Sub cmdClose_Click()
If IsNull(Me.subHorseDetailsChild.Form.OwnerID) Then
If Me.Dirty Then
Me.Undo
End If
If IsNull(Me.subHorseDetailsChild.Form.OwnerID) Or _
(IsNull(tbName) And IsNull(cbFatherName)) Then

If Me.Dirty Then
Me.Undo
End If
End If
End If

DoCmd.Close acForm, Me.Name

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top