Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PasteAppend error

Status
Not open for further replies.

sfenx

Programmer
Feb 23, 2001
81
BE
A while ago I converted an access2 application into access97. When I want to execute the following code on a form, I get the error "the action PasteAppend is temporarely not available" :
Code:
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend

This is the only problem that occurs in the whole app. The database is not read-only and is correctly converted.
I just want to select the whole record, copy it and make some modifications.
Can somebody help me ? :cool:
 
Perhaps try saving the record first with
DoCmd.RunCommand acCmdSaveRecord
and see that the form you are doing this from has appropriate settings i.e. AllowAdditions = True ? Gord
ghubbell@total.net
 
Gord, thanks for reacting so fast.
The AllowAdditions and AllowEditing are both set to true.
I saved it like you said, and this works (no errors), but the same error (PasteAppend not available) keeps occuring. Access stops on the current record and won't create a new one, although I'm able to go to a new blank record.
I've tryed copying the data via variables into a new record, but even that won't work.
Any ideas ?
 
You might try forcing the movement to a new record..try this
DoCmd.RunCommand acCmdSaveRecord
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.GoToRecord , , acNewRec
DoCmd.RunCommand acCmdPaste
might work! Gord
ghubbell@total.net
 
Gord,
I tryed what you wrote me, but now Access returns the error "copy not available".
Something very odd came up although. When I set the Popup of the (second) form to false, the original procedure works ! The only problem is that the Popup of the first form is also set to true, so that I can't view the second form (where the procedure runs on) when I turn his popup to false. The first form doesn't seem to cause the problem.
It's very important that the popup of the forms remain True, so the users can't mess with the databases.
Any suggestions ?
Sfenx :cool:
 
Sorry for the slow reply... busy busy...
Try playing with this command:
Forms!YourFormName.setfocus
before/after in between in order to control which form gets the focus. Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top