Solved

Run-Time Error 2501 on DoCmd.Save

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

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 retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

743 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

15 Experts available now in Live!

Get 1:1 Help Now