Mình có cái Function và Sub chôm của bạn Noname,sau khi chôm được về mình có sửa chút xíu để thực hiện link table như sau :

Function getFileData(Tit As String, formatName As String, formatType As String)

Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
With dlgOpen
.Title = Tit
.Filters.Clear
.Filters.Add formatName, formatType
.AllowMultiSelect = False
result = .Show
If (result <> 0) Then
getFileData = Trim(dlgOpen.SelectedItems.Item(1))
End If
End With
End Function


Sub LinkTable(p As String)
On Error Resume Next

getlink = getFileData("CUSTOMER RELATION MANAGEMENT SYSTEM", "Select Data File", "*.accdb")
If getlink <> "" Then
Set tempDB = OpenDatabase(getlink, True, False, "MS Access;PWD=" & p)
tempDB.NewPassword p, ""
tempDB.Close

Set tempDB = OpenDatabase(getlink)
For Each td In tempDB.TableDefs
strTDef = td.Name
If Left(strTDef, 4) <> "MSys" Then
DoCmd.TransferDatabase acLink, "Microsoft Access", tempDB.Name, acTable, strTDef, strTDef, True
End If
Next

tempDB.Close
Set tempDB = OpenDatabase(getlink, True, False, "MS Access;PWD=" & p)
tempDB.NewPassword "", p
tempDB.Close
Set tempDB = Nothing
End If
End Sub

Sau đó mình tạo 1 command button chạy cái Sub trên, chạy ngon lành nếu file Back End trên cùng máy với Front End ,nhưng không có tác dụng khi link Back End qua mạng Lan.
Giúp mình lý giải vì sao với nhé .
Thanks !!!!!!