S
Skip
I have an Access 02 report with an image box called ImageFrame that is linked
to the following code:
Dim picpath As String
Dim sFile As String
[imageframe].Picture = ""
sFile = "s:\photos\R" & "" & PROPERTY_ID & "" & "*.jpg"
picpath = Dir(sFile)
If picpath <> "" Then
sFile = "S:\Photos\" & picpath
[imageframe].Picture = sFile
[imageframe].Picture = ""
End If
End Sub
The report works great when a file exists but if there is no photo, the last
photo will display in the imageframe. It looks like the code is working right
but the imageframe is messed up? I have the properties on the image box:
Name:ImageFrame
Picture Frame: Embedded
Size Mode: Zoom
Visible: No
Any ideas why I can't get the image box on the report to be empty is a photo
is not available? Maybe it is the code, I'm not a great code writer. Any
ideas would be great.
to the following code:
Dim picpath As String
Dim sFile As String
[imageframe].Picture = ""
sFile = "s:\photos\R" & "" & PROPERTY_ID & "" & "*.jpg"
picpath = Dir(sFile)
If picpath <> "" Then
sFile = "S:\Photos\" & picpath
[imageframe].Picture = sFile
[imageframe].Picture = ""
End If
End Sub
The report works great when a file exists but if there is no photo, the last
photo will display in the imageframe. It looks like the code is working right
but the imageframe is messed up? I have the properties on the image box:
Name:ImageFrame
Picture Frame: Embedded
Size Mode: Zoom
Visible: No
Any ideas why I can't get the image box on the report to be empty is a photo
is not available? Maybe it is the code, I'm not a great code writer. Any
ideas would be great.