3011 - run time error (1 Viewer)

datacontrol

Registered User.
Local time
Today, 06:02
Joined
Jul 16, 2003
Messages
142
I get the following error when attempting to export a report to excel via vba:

The Microsoft Jet Database engine could not find the object 'over view report'. Make sure it exists and that you spell its name and the path name correctly.

This is really driving me nuts. Below is my command button code:

Private Sub ReadDoc1_Click()
Dim FileName As Variant
Dim Response As Integer
Dim Home As String

'
' Check Dialog Box values
'

If (Nz(Me.FileName, "x") = "x") Then
Response = MsgBox("You must specify an input file.")
Exit Sub

End If

DoCmd.OutputTo acExport, Forms!SB!Combo185, acFormatXLS, Me.FileName, True


MsgBox "The '" & Forms!SB!Combo185 & "' has been exported.", vbOKOnly

DoCmd.Close acForm, "ReadSubsystemDocument5"
End Sub
 
Last edited:

dcx693

Registered User.
Local time
Today, 01:02
Joined
Apr 30, 2003
Messages
3,265
Are you sure you have the proper DoCmd.OuputTo syntax?
 

datacontrol

Registered User.
Local time
Today, 06:02
Joined
Jul 16, 2003
Messages
142
dcx693 said:
Are you sure you have the proper DoCmd.OuputTo syntax?

I have tried many instances of the DoCmd.OutputTo syntax, this one gets me the closest. I don't understand why it is saying that it can't find this report, it definately exists!
 

dcx693

Registered User.
Local time
Today, 01:02
Joined
Apr 30, 2003
Messages
3,265
According to my Access help system, these are your options for the first parameter of the OutputTo method:
Code:
acOutputForm
acOutputModule
acOutputQuery
acOutputReport
acOutputTable
 

datacontrol

Registered User.
Local time
Today, 06:02
Joined
Jul 16, 2003
Messages
142
dcx693 said:
According to my Access help system, these are your options for the first parameter of the OutputTo method:
Code:
acOutputForm
acOutputModule
acOutputQuery
acOutputReport
acOutputTable


Thanks a million, this works.
 

Users who are viewing this thread

Top Bottom