I got this code from this site which I got to work. The only problem is that if no image exists that corresponds to the naming in the code...it throws an error. Anyone have any ideas on what I need to add to default it to a default image???? HELP!!! Thanks!
Here's the code: It uses the orderID + .jpg to find the image that is named 1234.jpg or whatever the orderid is.
Private Sub Form_Current()
If Forms![Orders].OrderID <> 0 Then
Me![Image20].Picture = "C:\My Documents\stadri\" & Forms![Orders].OrderID & ".jpg"
End If
End Sub
Here's the code: It uses the orderID + .jpg to find the image that is named 1234.jpg or whatever the orderid is.
Private Sub Form_Current()
If Forms![Orders].OrderID <> 0 Then
Me![Image20].Picture = "C:\My Documents\stadri\" & Forms![Orders].OrderID & ".jpg"
End If
End Sub