Record-dependant image (1 Viewer)

lenni

New member
Local time
Today, 17:31
Joined
Nov 10, 2012
Messages
7
Hello Access people.

I've got a table of employees, and one of its fields is a string containing the path for a small picture. So far, I've been able to retreive the image easily without problems in different forms, by inserting any blank image with the desired size on the form and then setting the Form.ControlName.Picture property to the path through VBA. So far, so good.

BUT NOW... I'm trying to use one of those continuous forms, which display lots of different records at once, and this VBA solution would show me the same employee face for each and every record/employee. Can you help me think of a solution that does not involve storing images into tables, since I understand this is prone to database corruption and it would increase the database size unnecessarily?

Thank you, dearly.

EDIT: I've found a related post on this forum entitled "Changing object properties of single record in multiple item form" (sorry, I'm not allowed to post the link, because I'm a forum newbie). Yet, it doesn't solve my question.
 
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:31
Joined
May 21, 2018
Messages
8,527
Neither way is correct. Use an image control and store the path in a field. No code is needed. You set the control source to the field with the path.
 

June7

AWF VIP
Local time
Today, 12:31
Joined
Mar 9, 2014
Messages
5,470
Yes, lots of images in db does use up file size limit. However, if db will have very limited data growth and unlikely to migrate to another db platform, I see small size images like jpg or png in file as a reasonable option. I have not encountered corruption from this.

And I agree if images are external VBA is not needed to dynamically display images as was with Access 2003.
 

Users who are viewing this thread

Top Bottom