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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime error 29068

Status
Not open for further replies.

deesheeha

Programmer
Jul 28, 2006
38
IE
Hello all!

Hope you can help me out. I have the following line of code:

DoCmd.Rename "rpt_RedLetter_Collection_IRL", acReport, "rpt_RedLetter_Collection_Active"

Everytime the code hits this report i get the following error:

Run-time error '29068' Microsoft Access cannot complete this operation. You must stop the code and try again.

Now if I go into my reports and manually open the report and close it and rerun the code it works fine!!!

Anyone any ideas??

Thanks
Dee
 
Have you tried a decompile? That can often fix odd errors.
 
How are ya deesheeha . . .

Is the report closed at the time the error occurs?

I can't say why the error occurs, but the following less direct method should work:
Code:
[blue][green]'Select the report in the Db Window[/green]
docmd.SelectObject acReport, "rpt_RedLetter_Collection_Active", True

[green]'Rename the currently selected object[/green]
docmd.Rename "rpt_RedLetter_Collection_IRL"[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Grrrrr, no that didnt work either!!! Starting to pull my hair out... Any other ideas?? Thanks for all your help so far!!
 
And what about this ?
CurrentProject.AllReports("rpt_RedLetter_Collection_IRL").Name = "rpt_RedLetter_Collection_Active"


Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top