Solved

Run-Time Error 2501 on DoCmd.Save

Posted on 2004-09-13
5
733 Views
Last Modified: 2012-05-05
One of my users is receiving run time error 2501 when the following statement is executed:

DoCmd.Save acForm, "frmXYZ"

I can perform the same action from my system without an issue, and I have 30 other users who havent encountered this problem.  I am leaning towards this being an issue with not having the proper version of something (such as MDAC) installed.

Thanks in Advance,

- Michael

0
Comment
Question by:mjs082969
5 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 250 total points
ID: 12044392
DoCmd.Save acForm, "frmXYZ"

this saves the property changes to the form object itself ... is this what you are really trying to do or just save the record?

Steve
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12044549
If you are trying to save the record, use:
Forms!frmXYZ.Dirty=False

Or from within the form itself:
Me.Dirty=False
0
 
LVL 13

Expert Comment

by:lucas911
ID: 12044699
Or you can also use this command to save a record:

DoCmd.RunCommand acCmdSaveRecord
0
 

Author Comment

by:mjs082969
ID: 12045265
The intent of the code was to save the record, not the entire form.

Thanks for the information!

(Although, I am still curious as why this only happened to one user, and not all of them)
0
 
LVL 39

Expert Comment

by:stevbe
ID: 12045294
perhaps they have Runtime and not full version of Access?
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now