record deletion in my forms

tru-

Registered User.
Local time
Today, 02:56
Joined
Jan 29, 2006
Messages
18
I have a form with a sub-form and a sub-sub-form :p
If I try to delete the record being viewed in the sub-form using
Code:
With DoCmd
    .DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    .DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End With

Then I here a ding (like you do when you try to delete a record) but I see no record delete confirmation box come up, if I hit enter, it deletes. So its there, but I can't see it, it's not behind the form either.
Any ideas?
Cheers
 
Interesting question, you may have a form_ondeactivate event firing that's hiding the window. Have you moved the form to see if it's under there?

Also, if you don't want the confirmation to show up you can always use

docmd.setwarnings = false

but remember to turn it back on afterwards or you won't see any error messages except runtime ones.

hope this helps.
 
The record in the sub form has to have the focus so that Access knows what to delete. Then you should requery the parent form and the sub forms to update the record source. I also advise that you use a custom message box with some detail of the record to be deleted and ask the user are they sure that they want to delete that record. Search around the forum for there are plenty of threads discussing and answering what you are trying to do.
 

Users who are viewing this thread

Back
Top Bottom