Solved

Report not exporting to Excel (just closes)

Posted on 2007-03-19
9
260 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now