F
Frank Dulk
I possess a separate system in FE/BE.
To link the tables, I use the procedure to proceed:
Sub Revincula()
Dim strConn As String, strBE As String
Dim tbl As Object
strBE = "SeuBE.MDB"
strBE = CurrentProject.Path & "\" & strBE
strConn = ";DATABASE=" & strBE
If Len(Dir(strBE) & "") = 0 Then Exit Sub
For Each tbl In CurrentDb.TableDefs
If Left(tbl.Name, 4) <> "MSys" _
And tbl.Connect <> strConn Then
tbl.Connect = strConn
tbl.RefreshLink
End If
Next
End Sub
I inserted password in Back-End and I started to use the code below:
Sub Revincula()
Dim strConn As String, strBE As String, strPwd As String
Dim tbl As Object
strBE = "SeuBE.MDB"
strPwd = "suasenha"
strBE = CurrentProject.Path & "\" & strBE
strConn = "MS Access;PWD=" & strPwd & ";DATABASE=" & strBE
If Len(Dir(strBE) & "") = 0 Then Exit Sub
For Each tbl In CurrentDb.TableDefs
If Left(tbl.Name, 4) <> "MSys" _
And tbl.Connect <> strConn Then
tbl.Connect = strConn
tbl.RefreshLink
End If
Next
End Sub
However I observed that when linking the tables of BE with password, the
relationships are not inherited.
How to outline this problem?
At once I thank.
To link the tables, I use the procedure to proceed:
Sub Revincula()
Dim strConn As String, strBE As String
Dim tbl As Object
strBE = "SeuBE.MDB"
strBE = CurrentProject.Path & "\" & strBE
strConn = ";DATABASE=" & strBE
If Len(Dir(strBE) & "") = 0 Then Exit Sub
For Each tbl In CurrentDb.TableDefs
If Left(tbl.Name, 4) <> "MSys" _
And tbl.Connect <> strConn Then
tbl.Connect = strConn
tbl.RefreshLink
End If
Next
End Sub
I inserted password in Back-End and I started to use the code below:
Sub Revincula()
Dim strConn As String, strBE As String, strPwd As String
Dim tbl As Object
strBE = "SeuBE.MDB"
strPwd = "suasenha"
strBE = CurrentProject.Path & "\" & strBE
strConn = "MS Access;PWD=" & strPwd & ";DATABASE=" & strBE
If Len(Dir(strBE) & "") = 0 Then Exit Sub
For Each tbl In CurrentDb.TableDefs
If Left(tbl.Name, 4) <> "MSys" _
And tbl.Connect <> strConn Then
tbl.Connect = strConn
tbl.RefreshLink
End If
Next
End Sub
However I observed that when linking the tables of BE with password, the
relationships are not inherited.
How to outline this problem?
At once I thank.