C
Chris Guld
I am using the On Current event to display a person's
photo (a .jpg file) on a form. Some people don't have a
photo, in which case I have another graphic as a
placeholder. I want to use IF to check if they have a
photo, a .jpg file. I obviously am not using FileExists
correctly. Here's my code:
Dim strPath As String
strPath = CurrentProject.Path & "\CurrentPics\" & Me!
PhotoPath
If FileExists(strPath) Then
Me.[ImageFrame].Picture = strPath
Else: Me.ImageFrame.Picture = CurrentProject.Path
& "\CurrentPics\NOPIC.jpg"
End If
Any help would be much appreciated.
Chris
photo (a .jpg file) on a form. Some people don't have a
photo, in which case I have another graphic as a
placeholder. I want to use IF to check if they have a
photo, a .jpg file. I obviously am not using FileExists
correctly. Here's my code:
Dim strPath As String
strPath = CurrentProject.Path & "\CurrentPics\" & Me!
PhotoPath
If FileExists(strPath) Then
Me.[ImageFrame].Picture = strPath
Else: Me.ImageFrame.Picture = CurrentProject.Path
& "\CurrentPics\NOPIC.jpg"
End If
Any help would be much appreciated.
Chris