Private Sub OK_Click()
Dim tabDef As TableDef
FileName.SetFocus
For Each tabDef In CurrentDb.TableDefs
If Len(tabDef.Connect) > 0 Then
tabDef.Connect = ";DATABASE=" & Me.FileName.Text '& "WD=" + 后台数据库密码 tabDef.RefreshLink End If
Next
MsgBox "数据库连接成功!"