Photo not changing properly.

bill crumpton

Registered User.
Local time
Today, 19:09
Joined
Apr 20, 2000
Messages
105
I have a text field in a person table that holds the path to a photo of a person. The photo is stored in a separate folder on my hard drive. Everything works great except this case: I have a form that contains 4 records, each record holds a picture of a different person. I have no problem applying the picture to the image frame to the path where the picture is stored, the problem I am having is if record 1 has a photo but record 2 does not have a photo, when I use the navigation buttons to go from record to record the person photo for recod 1 is showing up for all 4 records. How do I get the photo for record 1 to staty only with that record and not show for other records? I tried a requery of the image control but that didn't work.

Thanks.

BAC
 
It sounds like you are using an unbound image box. Make sure the image box has a control source (should be an OLE field in the person table).

Scott
access_junkie@hotmail.com

[This message has been edited by scottfarcus (edited 10-22-2001).]
 
I am using a bound image control due to the fact that I do not want to store the photo in Access. I am storing the photo on my hard drive and using a text field to direct the path to the photo location. I just cannot figure out how to get the photo to change when I scroll through the records on a form.
 
Thanks Al,
That is exactly the way my db is set up. My problem is when I enter a path for one picture, that same picture remains the default picture for evry record. I am trying to see if there is a way for the picture to remain only with the record it is assigned to as opposed to every record during navigation. Thanks for your help anyway.


BAC
 
An easy solution that I have come up with is to have a small bitmap with the writing "No Photo Available", or if you don't want this, then still create a bitmap, using the same background colour as your form (that way, it will not actual show). I then use this as the default mapping for the OLE field for the records.
This is then displayed, unless there is an actual photo.
You can put in code to refresh after each record, but I found the refresh sluggish, especially if you have many records.
 
Carol,
I have thought of that and have created a nice bitmap file to view when no person ohoto is available. I guess the problem I am having is setting it as the default value for thr image control on the form. I do not have a OLE control instead I am usins a text box to hold the path to the photo. How would I make a path to a generic photo the default value in an image control? Thanks for your help.

BAC
 
Later tonight, I will send a small sample database to show you how I have set this up in the past.

Maybe you can adapt the same procedures.
 

Users who are viewing this thread

Back
Top Bottom