I am receiving an intermittent failure in the visual basic code below. No error message is ever issued.

When the failure occurs, one or more of the tables ends up local (imported) instead of linked. If you immediately repeat the function it will work correctly. The machine its running on is running Microsoft XP. The linked tables come from multiple separate databases created by different people.

No security workgroup is employed. Users each have their own copy of the program on standalone PCs. Data databases containing the tables that are linked in are sometimes copied from one PC to another.

Public Function ap_ReLinkTables(strDataDB As String) As Boolean
Dim strLinkDB As String
strLinkDB = gconDataPath & strDataDB

On Error GoTo Error_ap_ReLinkTables
DoCmd.TransferDatabase acLink, "Microsoft Access", _
strLinkDB, acTable, "tblCompanyProfile", _
"tblCompanyProfile"
MsgBox "tblCompanyProfile successfully relinked", vbOKOnly, "COMPLETION"
DoCmd.TransferDatabase acLink, "Microsoft Access", _
strLinkDB, acTable, "tblSystems", _
"tblSystems"
MsgBox "tblSystem successfully relinked", vbOKOnly, "COMPLETION"
DoCmd.TransferDatabase acLink, "Microsoft Access", _
strLinkDB, acTable, "tblFunctions", _
"tblFunctions"
MsgBox "tblFunctions successfully relinked", vbOKOnly, "COMPLETION"
DoCmd.TransferDatabase acLink, "Microsoft Access", _
strLinkDB, acTable, "tblCustomerInfoRiskAssessment", _
"tblCustomerInfoRiskAssessment"
MsgBox "tblCustomerInfoRiskAssessment successfully relinked", vbOKOnly, "COMPLETION"
ap_ReLinkTables = True
Exit Function

Error_ap_ReLinkTables:
ap_ReLinkTables = False
MsgBox "ap_ReLinkTables " & vbCrLf & Err.Number & " " & Err.Description, vbOKOnly, "CRITICAL ERROR"
Exit Function
End Function