PDA

Click to See Complete Forum and Search --> : Moving Split Section of Access 97 DB


JohnL55
Jul 6th, 2000, 12:59 PM
I split an Access 97 database. Then I needed to move the data section. How can I get the two halves in sync again?
Get an error can not find data.

RogerH
Jul 7th, 2000, 10:02 AM
Hi,

call this proc with the name of the new database (works only with linked Access tables, no .dbf's etc.):


Sub Actual(DBName As String)
Dim dbCurr As Database
Dim tdfTab As TableDef

Set dbCurr = CurrentDb

For Each tdfTab In dbCurr.TableDefs
If tdfTab.Connect <> "" Then
DoCmd.Rename tdfTab.Name & "_sik", acTable, tdfTab.Name
DoCmd.TransferDatabase acLink, "Microsoft Access", DBName, acTable, tdfTab.Name, tdfTab.Name
DoCmd.DeleteObject acTable, tdfTab.Name & "_sik"
End If
Next tdfTab

End Sub


Roger