J
Jason Frazer
I have an image with the name "Image" in a form. When there is no data in
the field [PictureName] i don't want the image visible.
The "Image.Visible = no" code works great.
When i added this code "Image.Visible = yes" to make the image visable when
there is data in the [PictureName] field the image disappears.
What am i doing wrong.
I have included the code below.
Thanks for you help
Jason Frazer
Private Sub Form_Current()
Dim sImagePath As String
Dim Mycheck As Variant
Mycheck = IsNull(Me.PictureName)
If Mycheck = True Then
Image.Visible = no
Exit Sub
End If
Image.Visible = yes
sImagePath = CurrentProject.Path & "\Images\" & Me.PictureName & ".jpg"
'sImagePath = Me.PictureName
Image.Picture = sImagePath
Me.Refresh
End Sub
the field [PictureName] i don't want the image visible.
The "Image.Visible = no" code works great.
When i added this code "Image.Visible = yes" to make the image visable when
there is data in the [PictureName] field the image disappears.
What am i doing wrong.
I have included the code below.
Thanks for you help
Jason Frazer
Private Sub Form_Current()
Dim sImagePath As String
Dim Mycheck As Variant
Mycheck = IsNull(Me.PictureName)
If Mycheck = True Then
Image.Visible = no
Exit Sub
End If
Image.Visible = yes
sImagePath = CurrentProject.Path & "\Images\" & Me.PictureName & ".jpg"
'sImagePath = Me.PictureName
Image.Picture = sImagePath
Me.Refresh
End Sub