D
darren via AccessMonster.com
I have a split database which uses an FE updater. Because this used by
different teams each with their own BE, when a new version is released one of
the first things it does it set up the links to the relevant BE.This 'path'
is passed to it using cmd in the ini file.
However, I am finding that this code hangs if somebody is already in the
system (and therefore the BE). Code is as follows:
Dim db As Database
Dim tbl As TableDef
Dim rst As Recordset
p_strBEpath = Command()
DoCmd.Hourglass True
Set db = CurrentDb
Set rst = db.OpenRecordset("UsysLinkedTbls", dbReadOnly)
rst.MoveLast
rst.MoveFirst
Do Until rst.EOF
'Debug.Print rst("Name").value
Set tbl = db.TableDefs(rst("Name"))
If tbl.Connect <> p_strBEpath Then
With tbl
.Connect = p_strBEpath
.RefreshLink
End With
End If
rst.MoveNext
Loop
DoCmd.Hourglass False
Any suggestions as to how I can remedy this? On another thread some one
suggested just setting a new link instead of refreshing.Presumably I just
drop the .RefreshLink but if I do that will the link still be set up?
Thanks in advance.
different teams each with their own BE, when a new version is released one of
the first things it does it set up the links to the relevant BE.This 'path'
is passed to it using cmd in the ini file.
However, I am finding that this code hangs if somebody is already in the
system (and therefore the BE). Code is as follows:
Dim db As Database
Dim tbl As TableDef
Dim rst As Recordset
p_strBEpath = Command()
DoCmd.Hourglass True
Set db = CurrentDb
Set rst = db.OpenRecordset("UsysLinkedTbls", dbReadOnly)
rst.MoveLast
rst.MoveFirst
Do Until rst.EOF
'Debug.Print rst("Name").value
Set tbl = db.TableDefs(rst("Name"))
If tbl.Connect <> p_strBEpath Then
With tbl
.Connect = p_strBEpath
.RefreshLink
End With
End If
rst.MoveNext
Loop
DoCmd.Hourglass False
Any suggestions as to how I can remedy this? On another thread some one
suggested just setting a new link instead of refreshing.Presumably I just
drop the .RefreshLink but if I do that will the link still be set up?
Thanks in advance.