Chat with a LIVE Microsoft Access Expert!
 
       
 

         

   

Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
 
Chat with a LIVE Microsoft Access Expert!
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-20-2004, 07:20 AM
datacontrol datacontrol is offline
Registered User
 
Join Date: Jul 2003
Posts: 142
datacontrol
3011 - run time error

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
__________________
living a life of confusion

Last edited by datacontrol; 02-20-2004 at 07:24 AM..
Reply With Quote
Sponsored Links
  #2  
Old 02-20-2004, 07:38 AM
dcx693's Avatar
dcx693 dcx693 is offline
Registered User
 
Join Date: Apr 2003
Location: Brooklyn
Posts: 3,266
dcx693 is on a distinguished road
Are you sure you have the proper DoCmd.OuputTo syntax?
Reply With Quote
  #3  
Old 02-20-2004, 07:40 AM
datacontrol datacontrol is offline
Registered User
 
Join Date: Jul 2003
Posts: 142
datacontrol
Quote:
Originally Posted by dcx693
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!
__________________
living a life of confusion
Reply With Quote
  #4  
Old 02-20-2004, 07:50 AM
dcx693's Avatar
dcx693 dcx693 is offline
Registered User
 
Join Date: Apr 2003
Location: Brooklyn
Posts: 3,266
dcx693 is on a distinguished road
According to my Access help system, these are your options for the first parameter of the OutputTo method:
Code:
acOutputForm
acOutputModule
acOutputQuery
acOutputReport
acOutputTable
Reply With Quote
  #5  
Old 02-20-2004, 08:09 AM
datacontrol datacontrol is offline
Registered User
 
Join Date: Jul 2003
Posts: 142
datacontrol
Quote:
Originally Posted by dcx693
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.
__________________
living a life of confusion
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) copyright 2009 Access World