ado answer to TableDefs

T

Tom Loach

Can anyone tell me what the code is to replicate the Access TableDefs
collection?
For instance I can code the following to get table data:

Dim db as DAO.database
Dim tdf as DAO.TableDef

set db = currentDb()
For Each tdf In db.TableDefs
Debug.Print tdf.Name
Next tdf

What I want to do is to loop through an Access database and see if a
specific table exists and if not create the table, which brings me to my
next question. Can I use DDL to create the table?

Thanks,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top