Hi! I'm a new Access user and I'm trying to display photos in my access form based on a file path to the image. Sorry if my question is unclear--let me know how I can clarify anything!
I have 3 possible images that can show up on a form, and 3 columns in my table which can contain a file path. The code I have is able to update the image on the form if there is a file path in the field, but the image field does not update if the field in the table is blank, which means that it still displays the image from the previous form.
I need to have the image in the form be blank if there is no image path in the table. This is what I have that does display photos--what can I add to make it so that a null field in the table displays nothing??
Thank you in advance!Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath1]
On Error Resume Next
Me![ImageFrame2].Picture = Me![ImagePath2]
On Error Resume Next
Me![ImageFrame3].Picture = Me![ImagePath3]
End Sub
Private Sub ImagePath1_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath1]
End Sub
Private Sub ImagePath2_AfterUpdate()
On Error Resume Next
Me![ImageFrame2].Picture = Me![ImagePath2]
End Sub
Private Sub ImagePath3_AfterUpdate()
On Error Resume Next
Me![ImageFrame3].Picture = Me![ImagePath3]
End Sub