جرب هذا
Dim strFilter As String
Dim lngflags As Long
Dim varFileName As Variant
strFilter = "All Files (*.*)" & vbNullChar & "*.*" _
& vbNullChar & "All Files (*.*)" & vbNullChar & "*.*"
lngflags = tscFNPathMustExist Or tscFNFileMustExist _
Or tscFNHideReadOnly
varFileName = tsGetFileFromUser( _
fOpenFile:=True, _
strFilter:=strFilter, _
rlngflags:=lngflags, _
strDialogTitle:=" ÇáÑÌÇÁ ÇÎÊíÇÑ ãáÝ ")
If IsNull(varFileName) Then
Else
Me![ImagePath] = varFileName
DoCmd.GoToRecord , , acLast
DoCmd.GoToRecord , , acNext
End If
cmdAdd_End:
On Error GoTo 0
Exit Sub
cmdAdd_Err:
Beep
MsgBox Err.Description, , "Error: " & Err.Number _
& " in file"
Resume cmdAdd_End
Me.Refresh