حياك الله أخي @figo82eg 🙂
الحل هو في دالة تحضر لك رابط قاعدة البيانات سواء كانت مقسمة أو غير مقسمة ..
وهذه هي الدالة :
Public Function BECurrentPath()
On Error GoTo ErrHandler
Dim FullLinkedPath As String
Dim LinkedDBPath As String
FullLinkedPath = Nz(DLookup("Database", "MSysObjects", "Type=6"), "")
If FullLinkedPath <> "" Then
LinkedDBPath = Left(FullLinkedPath, InStrRev(FullLinkedPath, "\") - 1)
BECurrentPath = LinkedDBPath & "\"
Else
BECurrentPath = CurrentProject.Path & "\"
End If
ErrHandler:
If Err.Number = 0 Then Exit Function Else
MsgBox "Error Number : " & Err.Number & " :::: " & Err.Description
End Function
وسيتغير الكود الذي استخدمته أنت للوصول إلى الملف هكذا :
File_Path = BECurrentPath & "CONTACT\"
حسابات.rar