Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Call LinkSecTbl ("NewLinkedTableName", "TableNameToLink", "\\ServerName\Path\TheDBase.mdb", "\\ServerName\Path\TheDBase.mdw", "EgoNte", "ToTipota")
Sub LinkSecTbl (strNewTable As String, strTable As String, MDBFile As String, MDWFile As String, TheUserId As String, ThePassword As String)
Dim App_Cnn As ADODB.Connection
Dim cat As ADOX.Catalog
Dim tbl As ADOX.Table
Set App_Cnn = New ADODB.Connection
With App_Cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Data Source") = MDBFile
.Properties("Jet OLEDB:System database") = MDWFile
.Properties("User ID") = TheUserId
.Properties("Password") = ThePassword
.Properties("Mode") = adModeShareDenyNone
.Properties("Jet OLEDB:Engine Type") = 5
.Properties("Locale Identifier") = 1033
.Open
End With
Set cat = New ADOX.Catalog
Set tbl = New ADOX.Table
Set cat.ActiveConnection = App_Cnn
Set tbl.ParentCatalog = cat
With tbl
.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Link Datasource") = MDBFile
.Properties("Jet OLEDB:Remote Table Name") = strTable
.Name = strNewTable
End With
cat.Tables.Append tbl
cat.Tables.Refresh
Set tbl = Nothing
Set cat = Nothing
App_Cnn.Close
Set App_Cnn = Nothing
End Sub