Solved

Run-Time Error 2501 on DoCmd.Save

Posted on 2004-09-13
5
735 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

815 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

8 Experts available now in Live!

Get 1:1 Help Now