...
' Field "graphic" comes from the table an example would be wrench.tif
' imagepath is a standard path for all images (for this app).
' ImageAW is the name of my image control
'
' NOTE: you could store the entire path and name in the graphic field (c:\Inventory\Images\wrench.tif)
...
' Default turn off image
Forms!frmAssets.Controls!ImageAW.Visible = False
nlCheck = IsNull(Graphic) ' Test for a valid file name
If nlCheck = 0 Then
Forms!frmAssets.Controls!ImageAW.Visible = True
qualname = ImagePath & Graphic 'Graphic field may contain blanks
On Error GoTo Errorg
fileAttr = GetAttr(qualname) ' Valid DOS file name?
Me!ImageAW.Picture = qualname
End If
Exit Sub
Errorg:
' Invalid dos file name set to default
Forms!frmAssets.Controls!ImageAW.Visible = False
Exit Sub