S
Secret Squirrel
I'm trying to make a list of my employees using a continuous form. I also
want to show the image on this form as well. I have a single record form that
when you select an employee it shows their image. Here is the code I'm using
on the single record form:
Function setImagePath()
Dim strImagePath As String
On Error GoTo PictureNotAvailable
strImagePath = Me.memProperyPhotoLink
Me.memProperyPhotoLink.Locked = True
Me.memProperyPhotoLink.Enabled = False
Me.ImageFrame.Picture = strImagePath
Exit Function
PictureNotAvailable:
strImagePath = "C:\NoImage.gif"
Me.ImageFrame.Picture = strImagePath
End Function
I have this function firing in the OnCurrent Event of the single record form.
How come when I try to use this code on the continuous form it won't work?
When I put this code in the OnCurrent Event on the continuous form it will
show the same picture for all the records. When I open the form the first
record in the list is selected so it shows their picture for every employee.
Is there something different I need to do on a continuous form? The pictures
are linked to my database, not stored within the database. The
"memProperyPhotoLink" control is where the path to the picture is stored.
want to show the image on this form as well. I have a single record form that
when you select an employee it shows their image. Here is the code I'm using
on the single record form:
Function setImagePath()
Dim strImagePath As String
On Error GoTo PictureNotAvailable
strImagePath = Me.memProperyPhotoLink
Me.memProperyPhotoLink.Locked = True
Me.memProperyPhotoLink.Enabled = False
Me.ImageFrame.Picture = strImagePath
Exit Function
PictureNotAvailable:
strImagePath = "C:\NoImage.gif"
Me.ImageFrame.Picture = strImagePath
End Function
I have this function firing in the OnCurrent Event of the single record form.
How come when I try to use this code on the continuous form it won't work?
When I put this code in the OnCurrent Event on the continuous form it will
show the same picture for all the records. When I open the form the first
record in the list is selected so it shows their picture for every employee.
Is there something different I need to do on a continuous form? The pictures
are linked to my database, not stored within the database. The
"memProperyPhotoLink" control is where the path to the picture is stored.