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
Solved

Report not exporting to Excel (just closes)

Posted on 2007-03-19
9
294 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
corrupt Databases 9 65
Changing a line of VBA using VBA 3 33
Error can't find table ?? 5 24
Run Stored Procedure uisng ADO 5 20
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

839 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