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

linking images to forms and getting in reports

P: 3
sir as a computer operator i have to prepare the progress reports in ms access, as the strength is more we use admn (admission ) numbers as a student id, when i create the table and forms how can i insert the image of a student automatically by giving its path using the vba code. please suggest a very good answer in detail
May 6 '14 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 1,240
swaymprakash,
Here is a lengthy Microsoft article on handling images.
http://office.microsoft.com/en-us/ac...010341505.aspx

That's a lot of information but you have said you want a detailed answer. I think reading and understanding that article will give you all you need to know. We're here to help with any problems you encounter.

Jim
May 6 '14 #2

Expert 100+
P: 1,240
That is an article for Access 2010. You may want to look for a different version of the article if you are using some other Access version. Usually the information transfers well from version to version.

Jim
May 6 '14 #3

zmbd
Expert Mod 5K+
P: 5,397
I highly advise against using the attachment field, or indeed, imbedding the graphics into the Database.
Instead I suggest that you store the pictures in a directory and then store a path to those images in the database.

If you will use the search bar above, you will find that there are dozens of threads that all ask basically the same question:
“How Do I get an image in/on-to my form/report?”

So for a little background and one method:
Use images in your Access forms, reports, and controls (v2003) I think it is very important that there is an understanding of the fundamental methods of storage methods in the older MDB files as there is some carry over into the V2007/2010 formats (maybe 2013 too; however, I know very little about that version). I Still do not advise using the OLE method as it has been known to cause bloat along with other issues within the older databases and doesn't transfer well.

Provided in this link is also a link for a video for V2010 Video: Add, reuse, and update images on forms and reports

Finally, the way I’ve done this for years is to create a custom function and use it as the “picture” value for a “linked” image. The function refers to another control on the form for the file name and then works out the relative path via the currentproject.path value. Perhaps I may post an example database using my function.

However, shortly after I had figured out how to do this on my own I came across the following information that does something similar in that it uses a custom function; however, still much different in the final implementation: How to display images from a folder in a form, a report, or a data access page Article ID: 285820 (v2003) where in the events are used for updating the images, whereas my does not use any events.

If there's enough interest, I might create that generic db using my people template and some clipart... wont take me but a moment or two as the rest of the code is already in production.

swayamprakash
Keep in mind, we are not here to create the project nor write the code for you. If you can post your work, we can certainly guide you in the right direction.
May 6 '14 #4

Post your reply

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