I am hoping someone can point me in the right direction as I have had no luck searching for an answer to this....
I am using Access 2010 and I have a subform that contains a picture control. The image in the picture control is added to the form as follows:
Once a record is added with a picture, the user clicks a button to advance to a new record on the subform and this is the code I am using for that on the Main Form:
This works fine except for one thing... the picture remains in the image control. I cannot get it to clear.
I tried:
Me!subfrmEquipmentAdd.Image46 = "Z:\Shared\Location\Machine\No Picture.jpg"
But that just got me an error.... any suggestions?
I am using Access 2010 and I have a subform that contains a picture control. The image in the picture control is added to the form as follows:
Code:
Dim a
a = GetOpenFileName(ofn)
HoldPicturePath = Trim$(ofn.lpstrFile)
If HoldPicturePath <> "" Then
Me.Diagram = HoldPicturePath
Image46.Picture = Me.Diagram
Else
Image46.Picture = "Z:\Shared\Location\Machine\No Picture.jpg"
Me.Diagram.Value = "Z:\Shared\Location\Machine\No Picture.jpg"
End If
Once a record is added with a picture, the user clicks a button to advance to a new record on the subform and this is the code I am using for that on the Main Form:
Code:
Me!subfrmEquipmentAdd.SetFocus
DoCmd.GoToRecord acActiveDataObject, , acNewRec
This works fine except for one thing... the picture remains in the image control. I cannot get it to clear.
I tried:
Me!subfrmEquipmentAdd.Image46 = "Z:\Shared\Location\Machine\No Picture.jpg"
But that just got me an error.... any suggestions?