Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Run-Time Error 2501 on DoCmd.Save

Posted on 2004-09-13
5
Medium Priority
?
762 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 1000 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:Lucas
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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

810 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