BackUp and restore table

meenctg

Learn24bd
Local time
Tomorrow, 01:43
Joined
May 8, 2012
Messages
133
I have a database (name: main.mdb) here two tables. account and member.

For backup restoring process i created another access (version:2003) file in backup folder which name DataBackupRestore.mdb

I have tried to make copy tables macros but here i have a problem for destination. I wanna set the destination where i have opened my main database. Actually every times it will catch the current source path.
 
G'd evening,
I really can't help you with macros, but i guess would be easier to use the Windows backup tool or use vba for total flexibility.
something like this:
Code:
Private Sub ExporTables()
Dim tbl As TableDef

For Each tbl In CurrentDb.TableDefs
 If (tbl.Connect) <> "" Then
  If (tbl.Name) <> "MySys*" Then
    DoCmd.TransferDatabase acExport, "Microsoft Access",  strDestinationDB, acTable, tbl.Name, tbl.Name
    End If
  End If
Next
End Sub
G'd luck
 

Users who are viewing this thread

Back
Top Bottom