How can I add jpgs to Access record so they'll show up in reports

G

Guest

I am trying to create a list of people, with their pictures, so that I
eventually can create name tags with their pictures in it. How do I add jpgs
so that they're in the DB and more importantly that they'll show up in the
report? (Every record would have a different picture.)
 
B

Bill

I would suggest a folder with the jpg images whose file
names "name.jpg" corresponds to the individual. Then,
in your report, have a simple function that inserts the file
name of the individual into an image control that is linked
to the individual as each individual is processed.

I have a simple database with an example of such an
approach that I can e-mail to you if you'd like.

Bill
 
B

Bill

Copy of e-mail w/o attachment in response to Karen's request for
sample database:
=====================================================
Dear Karen,
Un-zip the attachment specifying "c:\". The results will be a folder
entitled c:\RSmith, as the path was included when the sample files were
zipped.

Open the mdb in the RSmith folder and preview the only report in the
database. You'll see how the pictures are inserted into the report as each
individual in the database is processed. After you've done that and see the
results,
look in the code-sheet of the report to see the function that retrieves the
picture ID from the data base and changes the file link in the control.

I've never even experimented with storing images in an Access database, as
their use would become so restricted as to render them useless in most of
the things I do with images... like what image display editing application
would be able to open them?

As long as we're on the subject, be very careful when it comes to images in
a database. Except in rare cases, you want to avoid "embedding". All the
rendering code necessary to display them in reports and/or forms gets
included in your database and its size can explode!

Regards,
Bill
(PS) Post back in the forum with how you make out with the sample database
that others might benefit.

cc: microsoft.public.access.formscoding w/o attachment
=====================================================
 
B

Bill

Karen,
I see that I didn't emphasize that the Image object is superimposed
on the OLE object frame. It's not necessary to do that with forms,
but is when images need to be linked in reports. So, in the design
view of the report, just click on the image control and drag it off to
the side temporarily while you examine the properties of the OLE
object control. (The use of two controls in dealing with images in
reports might have gone away in later versions of Access, but at
least in Access 2000 it was necessary.)
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top