In Access 2000, I have a multi user database. I want to ensure that all tables are correctly linked when a user access's the database. I am using the following code:
Dim Dbs As DAO.Database
Dim Tdf As DAO.TableDef
Dim Tdfs As DAO.TableDefs
Set Dbs = CurrentDb()
Set Tdfs = Dbs.TableDefs
Dbfolder 'module that returns database location
'Loop through the tables collection
For Each Tdf In Tdfs
If Tdf.SourceTableName <> "" Then 'If the table source is other than a base table
Tdf.Connect = ";DATABASE=" & CurrentFolder & "Database_Data.mdb" 'Set the new source
Tdf.RefreshLink 'Refresh the link
End If
Next 'Goto next table
End Sub
This works well when the front & back ends of the database are on the same machine.
My question is: how can I determine if the front & back ends of the database are on different machines? The module Dbfolder returns the location of the front end! I have mapped a drive to the folder containing the back end.
Dim Dbs As DAO.Database
Dim Tdf As DAO.TableDef
Dim Tdfs As DAO.TableDefs
Set Dbs = CurrentDb()
Set Tdfs = Dbs.TableDefs
Dbfolder 'module that returns database location
'Loop through the tables collection
For Each Tdf In Tdfs
If Tdf.SourceTableName <> "" Then 'If the table source is other than a base table
Tdf.Connect = ";DATABASE=" & CurrentFolder & "Database_Data.mdb" 'Set the new source
Tdf.RefreshLink 'Refresh the link
End If
Next 'Goto next table
End Sub
This works well when the front & back ends of the database are on the same machine.
My question is: how can I determine if the front & back ends of the database are on different machines? The module Dbfolder returns the location of the front end! I have mapped a drive to the folder containing the back end.