Stopping the delete

K

Karen

When users try to delete records, I just want the form to
set a status field equal to a deleted status and keep the
record.
This is what I have in the Delete event of the form.

Private Sub Form_Delete(Cancel As Integer)
Cancel = True
Me!STATUS_FK = 5
DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70
Me.Refresh
End Sub

It works ok if I'm doing just one record at a time, but
if I hilight three records, it only sets the status of
the first one, and it doesn't save the changes.
Any suggestions on how I can have all the rows save a
status?

Thanks
Karen
 

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

Top