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

Images on forms

P: n/a
Here's some fresh meat for the newsgroup hyenas.

I'm pretty new to setting up Access db's, so please be gentle.

How do I get my user forms to display a linked image file for each record.
(Eg. person's mugshot on a form with their personal details). This sounds
simple, and I'm surprised that I haven't worked it out yet.

I've tried the most obvious ways, but only seem to get the file icon not the
image itself.

Thanks, and sorry for wasting your valuable time.

DA
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Darren Allen wrote:
Here's some fresh meat for the newsgroup hyenas.

I'm pretty new to setting up Access db's, so please be gentle.

How do I get my user forms to display a linked image file for each
record. (Eg. person's mugshot on a form with their personal details).
This sounds simple, and I'm surprised that I haven't worked it out
yet.

I've tried the most obvious ways, but only seem to get the file icon
not the image itself.

Thanks, and sorry for wasting your valuable time.

DA


Not done it myself but make sure you're working with bitmaps first and
foremost. I don't think Access likes anything else.
Nov 13 '05 #2

P: n/a
On Sat, 21 Aug 2004 02:28:23 +1000, Darren Allen wrote:
Here's some fresh meat for the newsgroup hyenas.

I'm pretty new to setting up Access db's, so please be gentle.

How do I get my user forms to display a linked image file for each record.
(Eg. person's mugshot on a form with their personal details). This sounds
simple, and I'm surprised that I haven't worked it out yet.

I've tried the most obvious ways, but only seem to get the file icon not the
image itself.

Thanks, and sorry for wasting your valuable time.

DA


Add a field to your table, [Picname], that stores the name of the
picture associated with the person, i.e. "JohnSmith.jpg"
Store all the pictures in the same folder, but not as part of the
database.

Add an Image control to the form using any image to start with.
Set it's PictureType property to Linked.
After you save the control, delete it's Picture property.

Then code the Form's Current Event:

On Error Resume Next
Me!ImageName.Picture = "c:\Folder Path\" & Me![PicName]

You can use, among others, .bmp, and .jpg picture types.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a
"Darren Allen" wrote
Here's some fresh meat for the
newsgroup hyenas.
Eh? Would you care to clarify whether that was intended to be "cute" or
insulting?
How do I get my user forms to display
a linked image file for each record.
(Eg. person's mugshot on a form with
their personal details). This sounds
simple, and I'm surprised that I haven't
worked it out yet.
. . .
Thanks, and sorry for wasting your valuable time.


If we thought answering questions in newsgroups was a waste, chances are
high that we wouldn't do it. Most of us have been helped many, many times
and the only repayment ever asked was that, when able, we help someone else.

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.