[AccessD] OpenDatabase error with linked table
David Emerson
newsgrps at dalyn.co.nz
Wed Jan 3 22:49:50 CST 2018
I have the following lines in code:
Dim lmdb_Exceptions As dao.Database
Dim lrds_Exception_Records As dao.Recordset
'Setup Recordset for Capacity Exception table
Set lmdb_Exceptions =
OpenDatabase(Mid(DBEngine(0)(0).TableDefs("tblCapacityException").Connect,
11)) <-- Error here
Set lrds_Exception_Records =
lmdb_Exceptions.OpenRecordset("tblCapacityException", dbOpenTable)
lrds_Exception_Records.Index = "CapacityExceptionDate" 'Set Index for
dynaset
In the OpenDatabase line I get an error that "ActiveX Component can't create
object."
tblCapacityException is a linked table.
DBEngine(0)(0).TableDefs("tblCapacityException").Connect =
";DATABASE=\\PDS-SRV\ProdSched\Prod Sched Data.mdb"
I have read that I need to connect directly with the table database to use
the Index property.
This is a legacy program. Any suggested improvements on how to achieve this
would be appreciated.
Regards
David Emerson
Dalyn Software Ltd
Wellington, New Zealand
More information about the AccessD
mailing list