I have a sub form that contain an image control. The path of the image with change with program installations. The problem Is how can I trap the error that says the path is not found.
When the form is opened I get a msgbox that conatins, "NameOfMyProgram can't open the file C:\somepath". And this repeats twice before the form is loaded.
I have tried setting the path via Form_Load but I still get the error. The image does display.
Break on all errors is selected in Error Trapping
How can I trap this error or set the image path correctly?
Private Sub Form_Load()
Forms!Options![TripSheetSelector_Sub].Form.TripSheetThumb1.Picture = CurrentProject.Path & "\Samples\tripsheet1_thumb.jpg"