By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,291 Members | 1,613 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,291 IT Pros & Developers. It's quick & easy.

Insert images and chage in bound form based on each employee record using VBA

P: 22

The form I have built up just right before contains the employee’s details. I would love to get help to link to the images base on each record. We have more then 3000 employees in this project and would love if someone helps me how VBA can get link to folder where all images are stored.
I don’t want to store in table because it will get bigger and bigger and hoping it’s not the good ideas to do that way.

I actually prefer to link the image in folder using VBA so the images are change in the form when i move one record to another. I will be using bound form this project.

Any prompt help greatly appreciated
Thank you all
Nov 10 '11 #1
Share this Question
Share on Google+
1 Reply

P: 393
Your idea to link to an external folder is definitely the right way to go.

I have something similar and it works great. I have to dig it up to find how I did it specifically, but the general gist is set the 'Picture' property of the image to the file location. Obviously this needs to change as you change records, but that's also easy.

Just create a function that generates the string and set the property every time the record changes. Assuming that employee ID's are unique, you should name the pictures by employee ID. So if I'm employee 2999 then the picture in the file would be 2999.gif.

The picture property would then be set to \\yourfolderlocation\2999.gif
Nov 10 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.