Backup all tables to other DB
I try to back up all my tables to another DB with below code, it's work for for some certain number of tables only. After a while "transfer object method" was locked and won't unlocked further. Then coming out the below message
After transfer around 10-13 tables then it come out the following message
"The database engine could not lock table 'MSysAccessObjects' because it is already in use by person or another process"
If someone could know code to unlock it, please help advise
Thks so much for your help
I try to back up all my tables to another DB with below code, it's work for for some certain number of tables only. After a while "transfer object method" was locked and won't unlocked further. Then coming out the below message
PHP:
Code:
Dim BUpath As String
Dim obj As AccessObject, dbs As Object, PRname As String
BUpath = Application.CurrentProject.Path & "\Ritcha BU.mdb"
MsgBox "Already Back up Table at " & BUpath
Set dbs = Application.CurrentData
For Each obj In dbs.AllTables
PRname = obj.Name
DoCmd.TransferDatabase acExport, "Microsoft Access", BUpath, acTable, PRname, PRname, False
Next obj
After transfer around 10-13 tables then it come out the following message
"The database engine could not lock table 'MSysAccessObjects' because it is already in use by person or another process"
If someone could know code to unlock it, please help advise
Thks so much for your help
Attachments
Last edited: