Reputation: 289
I had an access form that displays photo of the users. When I click on the photo area, it also gives me to select the photo. Yesterday, I've upgraded my access from 2010 to 2016. I am using Microsoft Office 2016 plus. Now, the photos are not shown. It gives me to select the photos, but they're not displayed. The codes that I use is below.
Private Sub Photo_Click()
pl = PLFirst()
If IsNull(pl) Then
MsgBox "First select the person.", vbExclamation, "My sample project"
Exit Sub
End If
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.InitialFileName = GetValue("ScanFolder") & ""
fd.Title = "Select Photo"
fd.Filters.Clear
fd.Filters.Add "JPG or JPEG Images", "*.jpg; *.jpeg"
fd.show
If fd.SelectedItems.Count > 0 Then
If PhotoAddress & "" = "" Then
PhotoAddress = GetValue("PhotoAddress")
End If
FileCopy fd.SelectedItems(1), PhotoAddress & "\" & PeopleList.Column(1) & ".jpg"
End If
Set fd = Nothing
UpdatePicture
End Sub
I don't know it's something about the codes or compatibility issue. Any help will be appreciated.
Upvotes: 1
Views: 2275
Reputation:
Look at this post: Apparently Microsoft will fix the problem but as a workaround you can set the Current Database, Picture Property Storage Format to “Preserve source image format”.
Upvotes: 1