471,337 Members | 1,041 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Can't "SaveRecord"

Hi, On the form, I added a command button and used it to save the
current record. I added some error checking before
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Error # is: 2046
Error msg: The command or action "SaveRecord" isn't available now.
I am using Access 2003.

Feb 11 '07 #1
1 4288
Try replacing it with:
If Me.Dirty Then RunCommand acCmdSaveRecord

Add error handling in case there is a reason the record can't be saved (e.g.
a required field missing, duplicate index, validation rule not met, ...)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"swingingming" <mi******@gmail.comwrote in message
news:11*********************@v45g2000cwv.googlegro ups.com...
Hi, On the form, I added a command button and used it to save the
current record. I added some error checking before
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Error # is: 2046
Error msg: The command or action "SaveRecord" isn't available now.
I am using Access 2003.
Feb 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.