Topics Search

Run Time error 2046 Command action save record

Run Time error 2046 Command action save record
Views: 160
I have a frmCustomerEntry on which customer information is entered. After completing the information, the operator presses the Check In command button on frmCustomerEntry. At this point I am trying to save the customer information so it will be available when frmCheckIn is opened.

When the check In button is clicked, I am getting a run time error 2046. The command or action ‘Save Record’ isn’t available.
Sponsored Links:

More topics


error '2046' message on a save button option?

I created a save button with options to either save the record yes or no. When I click on no option the following error message appears. "Run Time error '2046': The command or 'Undo' isn't available now", However when I click yes nothing happens. Why has this occurred and how can I hide this message?

run time error 2046

I had to rebuild my laptop, I've reloaded my Access 2007 restored my database and program, I've checked all the references and have setup the trust locations. But when I go to open one of the forms I get this error 2046 with the message The command or action "gotorecord" isn't available now.

Run-time error 2046 the command or action "DeleteRecord" isn't available now

Run-time error 2046 the command or action "DeleteRecord" isn't available now

close the application with report page open

I have the report screen open. If I just want to quit the application from this stage(Access 2007) without closing tabs at the top, Access will give me an error:

"Command or Action 'SaveRecord' isn't available now.

Run-time error '2046'

I'm not trying to save any record or anything and I am just trying to get out of the application when a report is open.

Requery a form from its subform, then add new

I have a form with a subform with no navigation buttons. The subform has a cmdSave button to save the detail record. In its click event I have

If Not Me.NewRecord Then RunCommand acCmdRecordGoToNew

Depending on the order of these two statements I get a different problem.

If I use the order shown, the RecordGoToNew works but it is effectively undone by the requery. If I add another RecordGoToNew line I get error 2046: The command or action 'RecordGoToNew' isn't available now.

If I switch order I receive the 2046 error.

It seems that a requery prevents the GoToNew from working.

So far I have avoided doing the requery at all but how do I introduce it without creating a problem?

Run-time Error '2046' when using DoCmd.RunCommand acCmdCopy whilst browsing records

I have a simple form in access.

There is one field on the form , DocID, which has the name of a document. When the form is loaded, I want the docID to be copied onto the clipboard so the user can paste this into another program without having to do a manual keyboard or mouse routine. After doing the copy, it moves the focus to the next field where a user could paste his results.

So, for the oncurrent event I wrote:

'copy the doc id value to the clipboard

DoCmd.RunCommand acCmdCopy

'Move focus to DocID1 field

This works great if you acutally work with the record. No problems. The problem arises when/if the user scrolls through the records, instead of updating the record. Then I get the error:

Run-time Error '2046':
The command or action 'copy' isn't available now.

When I hit debug, it goes to the line: DoCmd.RunCommand acCmdCopy

Can anyone help me figure out why this doesn't work when you are browsing/scrolling through the recordset

OutputTo & 2046 Error - Revisited

I first tested it with a standalone macro. Once working, I created some code to execute the macro from a form with the database window hidden.

The macro worked fine. I then have tried to run the command from vba (so that I may easily alter the output location and file name on the fly).

I'm stuck on the 2046 error. Thinking there might be a problem with the variable stDocName, I tried the the report name as a quoted string --still get the error.

How to email several reports in pdf format to several recipients

I have several reports that I have made in access (2010) with it's reporting tool. What I would like to do is to send each of these reports off in an email to there corresponding departments. Sounds simple enough already huh?? Well I have the email function in place so that is finished but now what is happening is when I try to save the reports off in pdf format so they can be attached to the emails. I get a run time error, a "2046 The command or action 'Output To' isn't available now. I attempted to solve this by putting a "DoEvents" after the OutputTo and it continued to throw the same error. I then proceeded to make a timer function to cause the subroutine to "pause" for a few seconds and it worked for the first report but when the second report tried to produce BANG the same error.

For some background on what I am trying to accomplish here. I have a table that contains the PersonnelName, email, cc, subject respectively and are all text fields. The code calls a recordset to "lookup" the respective fields and produce an email with the report attached. I am not so worried about saving the report as attaching it to the email to be sent out as this is done daily. Oh I should probably mention this is all done by clicking a command button. So how would I go about producing the pdf for attachment?

Error 2046 when exporting a report from 2010 Runtime

I have a small reporting database in Access 2010 that does nothing but run a report and export it to PDF. This is called by a Windows Task each day and works perfectly, well almost. I haverecently had cause to need to run this report from a PC that has Access Runtime (also 2010) and on that machine the export reliably fails.

The error that is recorded (I write errors to a table rather than display them on the screen) is Error 2046 - "The command or action'OutputTo' isn't available now."

(where fileName = "C:\Reports")

DoCmd.OutputTo acOutputReport, "RptFinal", acFormatPDF, fileName, 0

Yet it works fine on a number of PC's with the full version of Access. If I change the windows task on the PC using full access to call Access using the runtime switch, it fails there as well. But remove the runtime switch and it's fine.

We are using Windows XP SP3 and Office 2010 SP1

'Copy' isn't available now...?

I have a form with a vba programmed button. It has been working fine for a while, but I came to use it today and it came up with the following:
Run-time error '2046':
The command or action 'Copy' isn't available now.

The only thing I have changed is that I have added a bit of tried & tested "timer" code around the original code - but I can't see how that would stop it from working!

The code I have is is a simple, open -> copy -> close:

DoCmd.OpenTable "TblJdeWeeklyDetailTEMP"
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy
DoCmd.Close acTable, "TblJdeWeeklyDetailTEMP"

The error highlights the 3rd line when you run the debug