simple vb error problem

Davros

Registered User.
Local time
Today, 05:45
Joined
Sep 9, 2005
Messages
131
i'm not very good at vb and i'm sure this is an easy problem but i can't find the answer.
i have constructed a vb code to show images from a stored table [not OLE linked]:

Private Sub Form_Current()
If Not IsNull(Me.combined_image_path) Then
Me.cempic.Picture = Me.combined_image_path
End If
End Sub

this works fine except when there is no image to show, the last image stays visable. what i want is no image to show if no image is availiabe for that record.
i know that the statement should be constructed along the lines of
'then'
if no image exists then show nothing
'else'
Me.cempic.Picture = Me.combined_image_path

any ideas of what this procedure should be??

thanks
 
how about this?

Private Sub Form_Current()
If Not IsNull(Me.combined_image_path) Then
Me.cempic.Picture = Me.combined_image_path
Else
Me.cempic.Picture.visible = false
End If
End Sub


or create a GIF or JPG file and put No image available? You know like one of those on findaproperty.co.uk when they have no image available for the property?
 
thanks
if i use your suggestion above i get the 'picture' part of the code

Me.cempic.Picture.visible = false

as an invalid qualifier.
i might actually give all records with no image a blank jpeg file as you suggested
unless of course
their are other suggestions?

thanks anyway
 

Users who are viewing this thread

Back
Top Bottom