Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2046 The command or action 'SaveRecord' isn't available now

414 views
Skip to first unread message

Joseph Lalor

unread,
Aug 10, 2002, 10:12:24 AM8/10/02
to
I am getting this error using the line of code

DoCmd.RunCommand acCmdSaveRecord

This worked fine in Office 97, but I've recently upgraded to Office 2000.

I'm using Windows 98.

Any solutions please?

Peter Russell

unread,
Aug 10, 2002, 12:54:00 PM8/10/02
to
I'm not clear about what you are saying.

Are you saying that you have converted a working A97 application to A2000
and this instruction no longer works?

Or are you saying that you are writing new code and this instruction
doesn't work as you would expect it to in A2000?

Regards

Peter Russell

In article <ba959.8020$zX3....@news.indigo.ie>, joel...@indigo.ie

Joseph Lalor

unread,
Aug 10, 2002, 1:05:29 PM8/10/02
to
I write an application in A97 years ago. I used RunCommand extensively and
it worked fine. I recently installed A2000 on my PC. I did not convert the
A97 application. It fails at the line containing RunCommand.

I have written a new application in A2000 and I am using RunCommand. I get
error 2046.

Any ideas?

"Peter Russell" <prus...@russellscott.co.uk> wrote in message
news:memo.2002081...@russellscott.btinternet.com...

Peter Russell

unread,
Aug 11, 2002, 4:33:00 AM8/11/02
to
I think that I have read somewhere (maybe a previous post) that the save
record behaviour changed from 97 to 2000.

The error now occurs if you try to save a record that doesn't need saving
(is not 'dirty').

So one possible solution would be to use :
if me.dirty = true then me.dirty = false

instead of your Docmd statement.
(or if me.dirty = true then DoCmd.RunCommand acCmdSaveRecord)

This will save the record if it needs to be saved, but not otherwise. In
fact you may not need the 'if' - I guess just doing me.dirty = false maybe
sufficient but I'm in the habit of doing the test.

Regards

Peter Russell

In article <sIb59.8038$zX3....@news.indigo.ie>, joel...@indigo.ie

Joseph Lalor

unread,
Aug 12, 2002, 2:50:36 PM8/12/02
to
Bullshit.

"Peter Russell" <prus...@russellscott.co.uk> wrote in message
news:memo.2002081...@russellscott.btinternet.com...

Michael P. Broida

unread,
Aug 12, 2002, 2:37:42 PM8/12/02
to
Just changing the value of "me.dirty" to "false" causes a save?

Hmm, not something I would have expected, but useful. :)

Mike

Larry Linson

unread,
Aug 12, 2002, 11:29:08 PM8/12/02
to
And, just what is

> Bullshit.

about which post, the original or the answer? And why?

Or are you just exercising your freedom of Internet speech?


Peter Russell

unread,
Aug 13, 2002, 4:00:00 AM8/13/02
to
I take it you disagree.

Well at my age memory plays tricks - I have now found the post I thought I
had read, and it wasn't an intentional change in behaviour, it was a bug
in A2000.

This was the MS response:

"If you are using Microsoft Access 2000, it does not check the setting of
the AllowAdditions property of the form. Access just checks the underlying
state of the AllowEdits property. If the AllowEdits property is set to No,
the Save Record command is not available.

To resolve this problem, obtain the latest service pack for Microsoft
Office 2000. "

However, if you have applied the service pack and you still have a dirty
record which can't be saved then I guess you have a different problem.

Regards

Peter Russell

In article <0rT59.8476$zX3....@news.indigo.ie>, joel...@indigo.ie

0 new messages