Solved

Report not exporting to Excel (just closes)

Posted on 2007-03-19
9
308 Views
Last Modified: 2013-11-28
Hi,

I'm running Access 2002 on Windows XP.  

I have  report that runs fine in Access but when I click "Analize it with Excell" the exporting dialog comes up for 2 seconds then disappears.  The report is not created but I don't get an error message.  Other reports open and export fine and I've tried rebooting my computer.

I tried exporting it with code:
    DoCmd.OutputTo acOutputReport, "rptMyTestReport", acFormatXLS, "C:\test.xls"

When I run it, I get the following error: "Run-time error '2759': The method you tried to invoke on an object failed."

Any ideas what could be causing the report to not export?  It was exporting earlier.  There is some code that runs on the formatting of the details section, but I've tried removing the script, but no change.

Thanks a lot for any help!
0
Comment
Question by:kalliopi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 2

Accepted Solution

by:
faz136 earned 400 total points
ID: 18753011
Sounds like a control on the report has been corrupted.  Try creating a blank database and importing that report in.  If there is a corruption on the report it will fail when you try to import it.
0
 
LVL 75
ID: 18753280
Could you maybe paste in the SQL driving the report?  
Are there any 'unusual objects' on your report, although I'm not sure what they would be on a report?
SubReports objects?

mx
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 18753285
Try entering True for the AutoStart parameter, which is the final parameter that you omitted. See if that makes any difference.  Entering true for the last parameter as shown, opens the report in excell as soon as the OutputTo action is completed.

DoCmd.OutputTo acOutputReport, "rptMyTestReport", acFormatXLS, "C:\test.xls",True

0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 6

Author Comment

by:kalliopi
ID: 18753417
Thanks for the replies.  I tried creating a new empty Database and importing it, worked fine.  I tried settting AutoStart to true, no difference.

OK, I started deleting controls to see what was causing it.  I found it to be a combo box (one of many) for phone numbers.  Can't see anything unique about the box, but when I deleted it, it worked.

Any idea what type of thing in a combo box could cause this problem?
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 100 total points
ID: 18753434
Only that maybe the combo box 'object' simply won't export to excel ... not sure why it would not.  

mx
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 18753451
WAG, the problem could be caused by special characters in the input mask.   Try w/o the mask.
0
 
LVL 2

Expert Comment

by:faz136
ID: 18753471
Still sounds to me like a corruption of that control rather than something wrong with it - if you completely re-create that combo box it will probably  still work.  
0
 
LVL 6

Author Comment

by:kalliopi
ID: 18753514
I tried to recreate the combobox and it didn't fix it.  I then made the visibility false and it worked.  Then with the visibility set to false I created a new textbox and set the source as "=[PER_linkto_PrimaryPhone].[Column](1)" and it works

Go figure!!!  Any ideas?

Thanks for your input, guys
0
 
LVL 2

Expert Comment

by:faz136
ID: 18753589
Is that column text or numeric in nature? How is it formatted? Generally I use dlookups or functions rather than combos on reports for this sort of reason - less to go wrong
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question