4th Posting-Still No reply to Access >= 2K Export To Excel. HELP!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on an application developed in Access 2000 as an ADP Project. Naturally it contains views and Stored Procedures. One of the queries called: "qryViewByMachineReworkedEmailData" is to be exported to an Excel97/2000/2002 format. However, the line of code that should do tthe exporting to excel is generating a strange error. The error reads as follows: Run Time Error 7874: can't find (database' name) the object "qryViewByMachineReworkedEmailData

Private Sub cmdExportToExcel_Click(

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qryViewByMachineReworkedEmailData", "MachineParts.XLS", Tru

End Su

Since this is an Access 2000 project application (Now running under Access XP) are there any issues that can possibly be causing this error? What is the fix? Is the code syntax wrong, if it is, can someone assist in correcting it

I am in a bind and pressed for time. I posted this earlier this morning. It seems that it did not post properly or not at all! 'Cause, I am not able to find the post from earlier. I am hoping that this time it will post correctly

Thanks in advance for the assistance


Print | Copy URL of this post
 
There is a problem using views (queries) within transferspreadsheet within
adp projects... No idea if its been resolved!

There was a post here sometime ago about this issue.

HTH
Sam

Russ said:
I am working on an application developed in Access 2000 as an ADP Project.
Naturally it contains views and Stored Procedures. One of the queries
called: "qryViewByMachineReworkedEmailData" is to be exported to an
Excel97/2000/2002 format. However, the line of code that should do tthe
exporting to excel is generating a strange error. The error reads as
follows: Run Time Error 7874: can't find (database' name) the object
"qryViewByMachineReworkedEmailData"
Private Sub cmdExportToExcel_Click()

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8,
"qryViewByMachineReworkedEmailData", "MachineParts.XLS", True
End Sub

Since this is an Access 2000 project application (Now running under Access
XP) are there any issues that can possibly be causing this error? What is
the fix? Is the code syntax wrong, if it is, can someone assist in
correcting it.
I am in a bind and pressed for time. I posted this earlier this morning.
It seems that it did not post properly or not at all! 'Cause, I am not able
to find the post from earlier. I am hoping that this time it will post
correctly!
 
I am not 100% sure but I don't think you can use a View as
the Source for the TransferSpreadsheet Method. The Help
topic says that the "TableName" argument is a Table Name
or a Select Query Name (but the Help can be incorrect!).

You probably need to use the MS-SQL Server Data
Transformation Services (DTS). If you have the MS-SQL
Server Books-On-Line (BOL), there is a sample application
in the BOL topic "DTS Programming Samples".

HTH
Van T. Dinh
MVP (Access)


-----Original Message-----
I am working on an application developed in Access 2000
as an ADP Project. Naturally it contains views and Stored
Procedures. One of the queries
called: "qryViewByMachineReworkedEmailData" is to be
exported to an Excel97/2000/2002 format. However, the line
of code that should do tthe exporting to excel is
generating a strange error. The error reads as follows:
Run Time Error 7874: can't find (database' name) the
object "qryViewByMachineReworkedEmailData"
Private Sub cmdExportToExcel_Click()

DoCmd.TransferSpreadsheet acExport,
acSpreadsheetTypeExcel8, "qryViewByMachineReworkedEmailData
", "MachineParts.XLS", True
End Sub

Since this is an Access 2000 project application (Now
running under Access XP) are there any issues that can
possibly be causing this error? What is the fix? Is the
code syntax wrong, if it is, can someone assist in
correcting it.
I am in a bind and pressed for time. I posted this
earlier this morning. It seems that it did not post
properly or not at all! 'Cause, I am not able to find the
post from earlier. I am hoping that this time it will post
correctly!
 
Back
Top