runtime error 3011 Microsoft Access could not find the Object (1 Viewer)

Oludare

New member
Local time
Today, 20:48
Joined
Jan 28, 2021
Messages
24
Hello All,

Could you please help.
I receive the error message runtime error 3011 Microsoft Access could not find the Object "stgHold" make sure the object exist and that you spell its name and path correctly. Please find below my code.

The Error Line: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, StrTableName, StrFileFormat & ".xls", True

full code is attached.

' Export Stg Reissue Payments Data to xls file.

Error Line: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, StrTableName, StrFileFormat & ".xls", True
 

Attachments

  • ReissuePayment_VBACodes.txt
    2.4 KB · Views: 283

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:48
Joined
May 7, 2009
Messages
19,229
the question is, do you have that table?
transferspreadsheet only applies to ms a table/query and not ado recordset.
 

Oludare

New member
Local time
Today, 20:48
Joined
Jan 28, 2021
Messages
24
Hello Arnelgp.
The table exist as a linked table in Access. IT is held in a variable strTableName in the script.
 

Isaac

Lifelong Learner
Local time
Today, 12:48
Joined
Mar 14, 2017
Messages
8,777
\\Dv0mssql07\gipt_dev07d\Bordereau\cri_"& Forms!frmReissuePayments.cboBordNo doesn't exist.

Debug.
 

Oludare

New member
Local time
Today, 20:48
Joined
Jan 28, 2021
Messages
24
Thank you all. Issue resolved by a solution design change. No longer required.
 

Users who are viewing this thread

Top Bottom