"You are about to delete 1 records....."

J

Jeff Klein

I am using the following code to cancel and close a form that is sourcesd to
a table.

DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
DoCmd.Close

When this code is executed it sends the following message:

"You are about to delete 1 records....."

Is there a way to use this code and not have the notice appear?
 
A

Allen Browne

Try:
If Me.Dirty Then Me.Undo
DoCmd.Close acForm, Me.Name

It should not generate a "delete" warning.
 
A

Allen Browne

Hmm. That sure supressses the warning, but it does not deal with the cause
(i.e. why you were getting it in the first place.)
 

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