I'm trying to use a macro/.mdb file that was written in Access 2003 in a new Access 2010 Access install. Opening my file I get a compile error saying the TableDef
object is not able to be found. When I check my Tools->References menu I see Microsoft DAO 3.6 Object Library as available, shouldn't that suffice? Or is something else needed for the TableDef
?
Use the CreateTableDef method to create a TableDef object. Set its properties. For each field in the table, use the CreateField method to create a Field object variable and set its properties. Use the Append method to add the fields to the Fields collection of the TableDef object.
In DAO, a table is an object of type TableDef. The tables of a DAO database are stored in a collection called TableDefs. To give access to this collection, the DAO object is equipped with a property named TableDefs that is of type TableDefs.
The DAO library for Access 2007 and 2010 is Microsoft Office x.x Access Database Engine Object Library
, not Microsoft DAO 3.6 Object Library
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With