Access 97 to 2002 conversion

M

Matt@NPS

When converting from Access 97 to 2002, I'm getting the following error when I run certain forms:

"Run-time error '2046': The command or action 'SaveRecord' isn't available now."

When I click Debug, it takes me to the following code:

"DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70"

I've looked at the help menus and it still lists acSaveRecord as an intrinsic constant. So, I'm unsure why it doesn't like the VB code.

Does anyone have any ideas?
 
G

GVaught

Check to make sure that your references under the code window is using DAO
3.6 and not ADO 2.1 or higher.

--
G Vaught

Matt@NPS said:
When converting from Access 97 to 2002, I'm getting the following error when I run certain forms:

"Run-time error '2046': The command or action 'SaveRecord' isn't available now."

When I click Debug, it takes me to the following code:

"DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70"

I've looked at the help menus and it still lists acSaveRecord as an
intrinsic constant. So, I'm unsure why it doesn't like the VB code.
 
J

John C.

while viewing the VBA code, select Tools, References.

Make sure DAO 3.6 is selected.

Also, I believe the DoMenuItem has been replaced with
RunCommand
 

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