Full Version: runtime error 2501 save action cancelled
UtterAccess Forums > Microsoft® Access > Access Forms
col
is there a solution to this problem?
Aquadevel
Col,
id you check for ALL/ANY errors before creating the runtime?
Odon't have A2002, :( but I know A2007 has to be 'clean' to get the runtime to work
properly.
Good luck, sad.gif
col
yes i do check for errors. i had added docmd.save after changing the record. is this necessary? and do you think it is the cause of the error msg?
jmcwk
What code are you using ? What Event are you using for the code ?
col
i'm using:
ocmd.save
in the after update procedure.
jmcwk
Maybe a crazy question on my part but why ? Once the form loses focus or is closed the data is saved. Sorry if I am missing the obvious.
HiTechCoach
Note:
Docmd.Save is used to save the dewsign cahnges od the object, NOT the data.

What event is the code in? TIP When poting ode, include all the code including the event DIm statements.

Oassume that this in the After Update event of some control an d NOT the form.

Try:

If Me.Dirty Then Me.Dirty = False

or

If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
Edited by: HiTechCoach on Mon Feb 4 14:53:52 EST 2008.
col
thx for the tips. i though docmd.save forced a save for the record. i guess its not needed. i will try the 'dirty' method suggested.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.