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

Export to Excel

Status
Not open for further replies.

mikeyb540

Programmer
Jul 7, 2003
173
US
Hello, got a strange problem

I have a command button on a form that exports a Query to Excel.
<b>Private Sub Command11_Click()
DoCmd.OutputTo acOutputQuery, "qryMonthly", acSpreadsheetTypeExcel9, , True
End Sub</B>

On click I get the following Run-Time Error

<b>Run-Time Error 2282
The formats that enable you to output data as a Microsoft Excel, rich- text format, MS-DOS text, or HTML file are missing from the Windows Registry</b>

Any idea whats the problem? Am I missing Controls?

Txs in Advance,
Mike
 
Maybe the conversion filters aren't installed.
Have you tried the DoCmd.TransferSpreadsheet method ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Txs PHV for the feedback.

The problem is that it works on other Win 2000 PCs with Access 2000. Just one of the PCs has this issue.

All the Access and Excel components with the sample databases are installed. Any other ideas?

 
I would uninstall and reinstall Office 2000 on the offending PC with all options selected.
 
aha...found the nasty bug...well FYI

DoCmd.OutputTo acOutputQuery, "qryMonthly", acFormatXLS

 
just a typo...was trying to make it Italic

DoCmd.OutputTo acOutputQuery, "qryMonthly", acFormatXLS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top