Import Form Macro

K

Kwok

Hi, I am using the below code to import tables and queries from another
access database. How can I get the name of all forms and reports from the
other database for importing using DoCmd.TransferDatabase?

Set db = DBEngine(0).OpenDatabase(LFilename)

db.TableDefs.Refresh

' I am using this to get all table names excluding system tables
For i = 0 To db.TableDefs.Count - 1
If Not db.TableDefs(i).Name Like "MSys*" Then
tblArray(itblCount) = db.TableDefs(i).Name
itblCount = itblCount + 1
End If
Next i
 

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