Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with a pictues viewer

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
I have a picture viewer, as part of a subform. This works fine, displaying the relevant picture for the asset described in the main table....Upon moving through records, the picture changes to the correct one until the asset in the main table does not have a picture. At this point it simply displays the previous image...Obviously this is no good, because it is displaying incorrect information....Below is the code I tried in an attempt to display a template image if the picture field is null.....


Private Sub Index_ID_Enter()
If IsNull(Forms!photoselection.FPhotos!A_IMAGE_PATH.Value) Or _
Forms!photoselection.FPhotos!A_IMAGE_PATH.Value = "" Then
MsgBox "No picture available"
With Forms!photoselection.FPhotos!Imagephoto
.Picture = "c:\land management 2001\lul\template\norton.jpg"
End With
End If
Forms!photoselection.FIND4.SetFocus
End Sub

Any suggestions on how to rectify this anyone???
 
Hi,

Instead of having null in the picture field of your main form for records that do not have a picture, cant you set them to your 'template' image instead? this way when it gets to that record it will just display this as it does for records that do have a picture.

Hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top