Cannot Save Record(!!)

  • Thread starter Thread starter Alan Greenwood
  • Start date Start date
A

Alan Greenwood

I use Access 97 on Windows 2000. I have a form where I have created a
button using the button wizard. When pressed the button performs the
Save Record action - except that it doesn't! The code generated by the
wizard is

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

When I press the button I get the following message:-

"The DoMenuItem action was canceled. You used a method of the DoCmd
object to carry out an action in Visual Basic, but then clicked Cancel
in a dialog box. For example, you used the Close method to close a
changed form, then clicked Cancel in the dialog box that asks if you
want to save the changes you made to the form."

As there was no dialog box with a Cancel button to press, I am puzzled
as to what the problem is. Thanks a lot in advance to anyone who can
help.
 
David

Thanks for trying, but I still get the same result. I should have said
in my original post that the record saves without problem if I press
Shift-Enter or use the Records Menu\Save Record: it only fails from
VBA.

Alan
--
 
I should have said in my original post that the record saves without
problem if I press Shift-Enter or use the Records Menu\Save Record: it
only fails from VBA.
 
Back
Top