Error: SaveRecord isn't available now (urgent)

J

JCP

Ms Access 2003
My database was working good. I don't know what I did and now don’t work.
I have many errors.

The following code, gives error.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Error: SaveRecord isn't available now

DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Error: Undo isn't available now

Some wizards to create buttons doesn't work
The wizard to create new form doesn't work.

I repair the office and I still have the same problem
I remove the office and I still have the same problem.

Please what can I do?
How can I remove the office and install it again to clear these errors?

Thanks a lot
jcp
 
V

Vantastic

You will need to error-trap these statements and use the RunCommand function.

to save record:
RunCommand acCmdSaveRecord

to undo:
RunCommand acCmdUndo

To error trap, have this at the start of your code:

On Error GoTo Err_Handler

So an Example for your Save button would be:

Private Sub cmdSave()

On Error goto Err_Handler

RunCommand acCmdSaveRecord

Err_Handler:

Exit Sub

End Sub

Do the same thing for your Undo button.

Hope this helps :)
 
J

JCP

Thanks,
Probably I couldn’t explain well.

The functions have error trap.
The functions were working well and I don't know what I did, at the moment
doesn't work.

I copy the mdb file to another computer, it works fine and there are not
problems. So, the problem is not error trap or the code, the problem is MS
Access 2003. That's why I ask how can remove MS Office 2003 completely and
registries and re-install it again to solve these problems.

If someone knows to solve this issue without remove Ms Office 2003 will be
much better.

PS. I tested your function using debug and gives the same error: The command
or action ‘SaveRecord’ isn't available now; Run-time error 2046

Function cmdSave()
On Error GoTo Err_Handler
RunCommand acCmdSaveRecord
Err_Handler:
Exit Function
End Function

Thanks a lot
jcp
 
J

JCP

I can open this same database (which is stored on the first computer) on a
different computer thru our home network and the error doesn't occur.
I checked the reference libraries and both computers are using the same ones.
I've repaired the installation of Office on the offending computer thinking
that perhaps there was something corrupted in the installation but the error
still occurs.
I remove the office and I re-installed it error still occurs.
I created a new database and imported all the objects from the
old database but the error still occurs in the new database.
I have no idea how to fix this issue in ms access and not in the database.
The database I think is ok, it works in others computers.
What to try next. Any ideas anyone?

Thanks
jcp
 
D

Dirk Goldgar

In
JCP said:
I can open this same database (which is stored on the first computer)
on a different computer thru our home network and the error doesn't
occur.
I checked the reference libraries and both computers are using the
same ones. I've repaired the installation of Office on the offending
computer thinking that perhaps there was something corrupted in the
installation but the error still occurs.
I remove the office and I re-installed it error still occurs.
I created a new database and imported all the objects from the
old database but the error still occurs in the new database.
I have no idea how to fix this issue in ms access and not in the
database. The database I think is ok, it works in others computers.
What to try next. Any ideas anyone?

Most likely you have a broken reference. Try the steps outlined in the
link below and see if they resolve the problem:

http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
J

JCP

I don't have broken references; it was the first step that I checked.

I created a new database, created a form and a button where I added a event:
RunCommand acCmdSaveRecord
The error still occurs.

I searched on the google and I saw is not the first time that this error
occurs, unfortunately I didn’t see any solution to fix it.

All databases in this computer give this error when I run event and if it
has RunCommand acCmdSaveRecord.

Any solutions?

thanks
jcp
 
V

Vantastic

Last time that kinda stuff happened to me I did a registry clean... there are
some free scanners out there you can use.

Last resort: a complete reinstall... Windows can be a pain in the butt
 
J

JCP

I bought RegCure program to scan and clean registry and the error still occurs.
Someone have idea how can remove the office completely?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Run time error '2001' You cancelled the previous operation 2
vba coding 4
SaveRecord isn't available 2
cancel button to undo data entry 1
Error 2237 8
new form 1
Clear a form 1
Code error when opening a form 2

Top