وعليكم السلام ورحمة الله وبركات أخي @qathi ،،
استكمالاً لطلبك في موضوع سابق ، تفضل هذا التعديل على الزر المسؤول عن السحب من السكانر ,,
Private Sub scan1_Click()
[picfile] = Null
On Error Resume Next
Dim filelocation As String ' متغير موقع الملف
filelocation = Application.CurrentProject.Path & "\" & "Image" & "\Items\" & Me.mID & "T." & ".jpg"
'filelocation = Application.CurrentProject.Path & "\" & "Image" & "\" & "Items" & "\" & Me.mID & "T." & ".jpg"
If scanner.DeviceInfos.Count = 0 Then
MsgBox "لا يوجد ماسح ضوئي متصل", vbExclamation
Exit Sub
End If
Dim scandiag As New WIA.CommonDialog
Dim image As WIA.ImageFile
Set image = scandiag.ShowAcquireImage
image.SaveFile filelocation
Me.picfile = filelocation
Me.Refresh
End Sub
الإضافة كانت فقط في الجملة الشرطية في الكود .. وهذا الملف المرفق بعد التعديل ..
Scan01.accdb