Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
Dim dbs1 As dao.Database
Dim dbs2 As dao.Database
Set dbs1 = OpenDatabase("C:\HCCTRL\Backup.accdb", True, False, "MS Access;PWD=BANDA")
Set dbs2 = OpenDatabase("C:\HCCTRL\CHEQUESbe.accdb", True, False, "MS Access;PWD=DISSA")
dbs1.Execute "DROP TABLE BGTB;"
dbs2.Execute ("select BGTB.* into BGTB in 'C:\HCCTRL\Backup.accdb' from BGTB")
dbs1.Close
dbs2.Close
Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click
End Sub
On Error GoTo Err_Command25_Click
Dim dbs1 As dao.Database
Dim dbs2 As dao.Database
Set dbs1 = OpenDatabase("C:\HCCTRL\Backup.accdb", True, False, "MS Access;PWD=BANDA")
Set dbs2 = OpenDatabase("C:\HCCTRL\CHEQUESbe.accdb", True, False, "MS Access;PWD=DISSA")
dbs1.Execute "DROP TABLE BGTB;"
dbs2.Execute ("select BGTB.* into BGTB in 'C:\HCCTRL\Backup.accdb' from BGTB")
dbs1.Close
dbs2.Close
Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click
End Sub