M
MikeF
Attempting to copy an Access query into Excel.
All References [dao, etc] are set properly, and all syntax below is correct.
DEBUG lands here ...
("D:\ExcTst.accdb")
Set MyQueryDef = MyDatabase.QueryDefs("qryTest_ToExcel")
.... And Runtime Error 3343 / Unrecognized Database Format appears.
How can this be fixed?
Thanx,
- Mike
*** Here's the first part of the code in entirety:
Sub RunAccessTestQuery()
Dim MyDatabase As DAO.Database
Dim MyQueryDef As DAO.QueryDef
Dim MyRecordset As DAO.Recordset
Dim i As Integer
Set MyDatabase = DBEngine.OpenDatabase _
("D:\ExcTst.accdb")
Set MyQueryDef = MyDatabase.QueryDefs("qryTestToExcel")
Set MyRecordset = MyQueryDef.OpenRecordset
All References [dao, etc] are set properly, and all syntax below is correct.
DEBUG lands here ...
("D:\ExcTst.accdb")
Set MyQueryDef = MyDatabase.QueryDefs("qryTest_ToExcel")
.... And Runtime Error 3343 / Unrecognized Database Format appears.
How can this be fixed?
Thanx,
- Mike
*** Here's the first part of the code in entirety:
Sub RunAccessTestQuery()
Dim MyDatabase As DAO.Database
Dim MyQueryDef As DAO.QueryDef
Dim MyRecordset As DAO.Recordset
Dim i As Integer
Set MyDatabase = DBEngine.OpenDatabase _
("D:\ExcTst.accdb")
Set MyQueryDef = MyDatabase.QueryDefs("qryTestToExcel")
Set MyRecordset = MyQueryDef.OpenRecordset