I use a function for copying all the tables from a database.Can i add on an argument to copy Structure Only tables?
Below is the function i use
Public Function ImportAllTables(DBName)
Dim Strpassword As String
Strpassword = “secret”
Dim db As DAO.Database
Set db = DBEngine.Workspaces(0).OpenDatabase(DBName, dbDriverComplete, False, “; PWD=” & Strpassword)
Dim FrontDB As DAO.Database, BackDB As DAO.Database, Tbl As TableDef
Set FrontDB = CurrentDb
Set BackDB = OpenDatabase(DBName)
For Each Tbl In BackDB.TableDefs
If Tbl.Attributes = 0 Then
DoCmd.TransferDatabase acImport, “Microsoft Access”, BackDB.Name, acTable, Tbl.Name, Tbl.Name
End If
Next
BackDB.Close
FrontDB.Close
End Function
-
Structure only arument (Access 2000)
- This topic has 1 reply, 2 voices, and was last updated 19 years, 5 months ago.
AuthorViewing 0 reply threadsAuthorViewing 0 reply threads