I used the below example and it works, but if a record does not have a picture on file to load, the last picture remains in the image control. How can I make this control not visible if there is no image file matching the unique ID requested? It only changes when there is a different picture to load.
Private Sub Form_Current()
If Me![ID]<> 0 then
Me!Image14.Picture="C:\MyPhotos\Pics\"&Me![ID]&.jpg"
End if
End sub
To be clearer, I guess, is that all my records have an ID, just some do not have image files. So when you cycle through the records correct images dispay for the ID, however if the record has no image file, it continues to show the last image. I would rather the control be come invisible. Any ideas will be most appreciated!
Private Sub Form_Current()
If Me![ID]<> 0 then
Me!Image14.Picture="C:\MyPhotos\Pics\"&Me![ID]&.jpg"
End if
End sub
To be clearer, I guess, is that all my records have an ID, just some do not have image files. So when you cycle through the records correct images dispay for the ID, however if the record has no image file, it continues to show the last image. I would rather the control be come invisible. Any ideas will be most appreciated!