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

Error while exporting report from Access

Status
Not open for further replies.

mabbott70

Programmer
Dec 18, 2003
2
GB
I'm trying to export a crystal report using Access VBA. The report is written in Crystal 8 and is connected to an Oracle database using native Oracle drivers.

my code is as follows:

Dim crxApp As New CRAXDRT.Application
Dim crxReport As CRAXDRT.Report

Set crxReport = crxApp.OpenReport("R:\GB Payments - Vendor Master Data.rpt")

With crxReport
With .ExportOptions
.DiskFileName = "H:\G&B\test.ttx"
.DestinationType = crEDTDiskFile
.FormatType = crEFTTabSeparatedText
End With
'Don't prompt for export options
.Export False
End With

Set crxReport = Nothing
Set crxApp = Nothing

However when the code reaches the ".Export False " line in the code I get a error message as follows:

Run time error '-2147191776 (80047420)'

Too many arguments have been given to this function.


Does anyone have any ideas why this might be?
 
Please ignore this thread. I've found the error, I'd been stupid and not checked if the report worked ok just within the crystal environment. On checking this found that it didn't. All Access was doing was reporting the error which was occurring in Crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top