这是我创建的一个界面,用于帮助客户在IT部门决定更改网络名称或路径时切换数据库链接。
我正在尝试清理我搞砸的例程。它曾经工作得很好,但现在它没有刷新,我无法弄清楚原因。
1)当用户点击“浏览”为数据库选择新路径时,我称之为例程:
(1,2)
2)当选择新路径时,我希望链接表自动切换到用户选择的内容 - 我调用一个名为ChangeLinkPath的例程,我称之为:
Private Sub cmdBrowsePath_Click()
Dim strFile As String
Dim strPath As String
Dim strNewPath As String
strFile = GetFilePath("Locate and select the Master Database")
If strFile <> "" Then
Me.txtMaster = strFile
Call ChangeLinkPath("TBL_VERSION_LATEST", Me.txtMaster)
End If
End Sub
除了最重要的部分之外,一切都有效 - 更改链接路径!
我在选择新路径后检查链接,它只在文本框中更改,但不在链接本身中更改。当我将鼠标悬停在链接上时,它仍然具有旧路径。我错过了什么?
如果我知道,我可以使用这个基本部分来改变任何链接路径。