Multiple images in a Form

  • Thread starter Thread starter milly54
  • Start date Start date
M

milly54

Guest
Hi,
I'm building an image database where the user selects specific images from the main image table.

I'm trying to create a separate form which displays the selected images.

However, although my form displays the selected records text, it displays a repeated image, relating to the "focus" record.

How can I make it so the correct image is displayed for each record on the form?

Thanks
Milly54
 

Attachments

  • screencap.jpg
    screencap.jpg
    12.1 KB · Views: 206
Sounds like you have an unbound object (image) on a continuous form. So when you added it to the form it will be the same for every detail record.

Try setting the control source equal to the text of image you want to display. This way as the text changes the control source will change for that object.

Can you supply more detail on the what the text box looks like which works and the format of the image name(s)?
 
You have a continious form. You have no joy. Microsoft need to address this situation as I have never seen a work around yet.

Dave
 
Thanks for the replies guys.

I'm using the following code fom MS 210100 where I use an Image Control, and the table holds the image filenames.

The code sets the path to the images to be the same as the current database, so i don't have to type in the whole path in each record.

The only thing is that images and DB have to be in the same folder, but this does make it transportable.



[Function SetImagepath()
Dim strImagePath As String
Dim strMDBPath As String
Dim intSlashLoc As String

On Error GoTo PictureNotAvailable
'obtain full path of the current database
strMDBPath = CurrentProject.FullName

'find the location of the last backslash
intSlashLoc = InStrRev(strMDBPath, "\", Len(strMDBPath))
'trim off the database name, leaving the path
'and append the name of the image file
strImagePath = Left(strMDBPath, intSlashLoc) & Me.txtImageName

'set ImageFrame to the path of the image file
Me.ImageFrame.Picture = strImagePath


Exit Function
PictureNotAvailable:
strImagePath = "No Image.jpg"
Me.ImageFrame.Picture = strImagePath

End Function


Matbe a little extra code to increment the selected images on the form?

Beats me - little VB experience!

Milly54
 
contd....

I should've added that I'm using linked .jpg images form outside the database.

Please see the (clearer) screencap for what I'm trying to achieve.


Thanks
Milly54
 

Attachments

  • screencap.jpg
    screencap.jpg
    57.5 KB · Views: 172

Users who are viewing this thread

Back
Top Bottom