P
Programmer - wannaB
I'm using some code provided by Wayne-I-M, but rather then duplicating the
AcExport line for each table, I wanted to loop through one line of code for
a list of tables. This works, but I thought I would post it out and see if
anyone would like to comment on what could be done better (different)..
I appreciate all comments, Thank you..
Public Sub Export()
Dim db As Database
Dim mylist, tbl
Set db = CurrentDb()
mylist = Array("Detail", "AIN", "NoteLog", "Info", "Profile", "Commentary",
"Country", _
"Econ", "Fin ", "Type", "Limits", "PDtable", "ranger", "Overlay")
'Use AcExport rather then AcImport to Export tables to destination DB
without deleting the tables first – this is to prevent tables from coming in
with a 1 at the end of the table name.
For Each tbl In mylist
DoCmd.TransferDatabase acExport, "Microsoft Access", _
"D:\Data\DBA\Dev\ProductionDB.mdb", _
acTable, tbl, tbl, structureonly:=False
Next
End Sub
AcExport line for each table, I wanted to loop through one line of code for
a list of tables. This works, but I thought I would post it out and see if
anyone would like to comment on what could be done better (different)..
I appreciate all comments, Thank you..
Public Sub Export()
Dim db As Database
Dim mylist, tbl
Set db = CurrentDb()
mylist = Array("Detail", "AIN", "NoteLog", "Info", "Profile", "Commentary",
"Country", _
"Econ", "Fin ", "Type", "Limits", "PDtable", "ranger", "Overlay")
'Use AcExport rather then AcImport to Export tables to destination DB
without deleting the tables first – this is to prevent tables from coming in
with a 1 at the end of the table name.
For Each tbl In mylist
DoCmd.TransferDatabase acExport, "Microsoft Access", _
"D:\Data\DBA\Dev\ProductionDB.mdb", _
acTable, tbl, tbl, structureonly:=False
Next
End Sub