وعليكم السلام ورحمة الله وبركاته ..
تفضل المرفق بعد تعديل الحدث ليصبح :-
Private Sub cboOpenPDF_AfterUpdate()
Dim strPath As String
Dim objShell As Object
strPath = CurrentProject.Path & "\" & Me.cboOpenPDF.Column(2) & ".PDF"
If Not IsNull(strPath) And strPath <> "" Then
If Dir(strPath) <> "" Then
Set objShell = CreateObject("Shell.Application")
objShell.Open (strPath)
Set objShell = Nothing
Else
MsgBox ":الملف غير موجود في المسار" & vbCrLf & strPath, vbExclamation + vbMsgBoxRight, "ملف غير موجود"
End If
Else
MsgBox "لم يتم تحديد مسار للملف", vbExclamation + vbMsgBoxRight, "خطأ"
End If
End Sub
الاختبار.zip