J
JimS
I've tried this several ways, but I can't seem to get this to work. It's
simple. I want to delete the "child" records, then the "Parent" records. The
part that deletes the "Child" records (A2007, Referential Integrity set)
works fine all the time. The deletion of the "Parent" record fails whenever
there are no "Child" records.
I tried using a recordsetclone to delete the current record, and then this,
but none works. AllowDeletions is set to true.
-----code follows:
Dim rst As DAO.Recordset
Set rst = Me.sfmFBoMDetail.Form.RecordsetClone
rst.MoveFirst
While Not rst.EOF
rst.Delete
rst.MoveNext
Wend
Set rst = Nothing
DoCmd.RunCommand acCmdDeleteRecord
-- end of code
Jim
simple. I want to delete the "child" records, then the "Parent" records. The
part that deletes the "Child" records (A2007, Referential Integrity set)
works fine all the time. The deletion of the "Parent" record fails whenever
there are no "Child" records.
I tried using a recordsetclone to delete the current record, and then this,
but none works. AllowDeletions is set to true.
-----code follows:
Dim rst As DAO.Recordset
Set rst = Me.sfmFBoMDetail.Form.RecordsetClone
rst.MoveFirst
While Not rst.EOF
rst.Delete
rst.MoveNext
Wend
Set rst = Nothing
DoCmd.RunCommand acCmdDeleteRecord
-- end of code
Jim