Thanks in advance,
I am working on an update install program. Prior to begining the Installation/upgrade I want to backup the clients mdb, this backup will be kicked off from another mdb running the upgrade proceedurs. After the backup I want to remove certain tables in the clients mdb I will then replace the tabels later.
I have seen a few post that get me going in one direction but then I seem to get lost.
for the backup of a remote mdb I have no clue other then asking the user to make a copy prior to doing the update. and how many users will do that?
Here is what I have for the delete remote mdb tables.
Function testdel()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim dbLink As Database
Dim tdf As TableDef
Dim strClientDataPath As String
Set db = CurrentDb()
Set rsexport = db.OpenRecordset("07_ClientTableList")
strClientDataPath = rs.rsexport!("ClientDataPath")
Set dbLink = DBEngine.OpenDatabase(strExportdataPath)
For Each tdf In dbLink.TableDefs
If (tdf.Attributes And dbSystemObject) = 0 Then
strname = tdf.Name
' For the Delete this is where Im having a problem
' I have used
DoCmd.DeleteObject acTable, strname ' this delete the tabel if it is local
End If
Next
exit_testdel:
Set rs = Nothing
Set db = Nothing
Set dbLink = Nothing
Set tdf = Nothing
Exit Function
err_testdel:
MsgBox (Err.Number & " " & Err.Description)
Resume Next
End Function
thanks again
Jim Garry
I am working on an update install program. Prior to begining the Installation/upgrade I want to backup the clients mdb, this backup will be kicked off from another mdb running the upgrade proceedurs. After the backup I want to remove certain tables in the clients mdb I will then replace the tabels later.
I have seen a few post that get me going in one direction but then I seem to get lost.
for the backup of a remote mdb I have no clue other then asking the user to make a copy prior to doing the update. and how many users will do that?
Here is what I have for the delete remote mdb tables.
Function testdel()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim dbLink As Database
Dim tdf As TableDef
Dim strClientDataPath As String
Set db = CurrentDb()
Set rsexport = db.OpenRecordset("07_ClientTableList")
strClientDataPath = rs.rsexport!("ClientDataPath")
Set dbLink = DBEngine.OpenDatabase(strExportdataPath)
For Each tdf In dbLink.TableDefs
If (tdf.Attributes And dbSystemObject) = 0 Then
strname = tdf.Name
' For the Delete this is where Im having a problem
' I have used
DoCmd.DeleteObject acTable, strname ' this delete the tabel if it is local
End If
Next
exit_testdel:
Set rs = Nothing
Set db = Nothing
Set dbLink = Nothing
Set tdf = Nothing
Exit Function
err_testdel:
MsgBox (Err.Number & " " & Err.Description)
Resume Next
End Function
thanks again
Jim Garry