[AccessD] Message on deleting records

Doug Murphy dw-murphy at cox.net
Fri Oct 29 18:07:29 CDT 2004


Hi Folks,

I have a data entry form with a subform on it.  On new record entry a cancel
button is visible so if the user decides to not complete the entry of the
new record they can cancel out of it.  Since several fields on the form are
auto filled and the user may have, entered data, moved onto the subform or
whatever, when they hit cancel I run a delete query for the record on the
subform and one for the record on the main form using their primary keys.
They queries are of the form; "Delete * From tablewhatever where fldID =
recordIDFromForm"  All this works great except that when the form closes and
the queries have run I get an Access message saying "You can not add or
change a record because a related record is required in tblLot".  The delete
queries run and delete their respective records with no problem, but I don't
know why I am getting this message.  The queries run in the order of child
record, parent record.

Any thoughts on how to get rid of this message would be appreciated.  I have
turned warnings off before running the delete queries.

Doug





More information about the AccessD mailing list