picturess

R

Richard Wright

Hi Everyoune - I need your help! I'm trying to create a database for my
church that will display a picture of the family or individual who's record
is active on my form. It seemed straight forward at first, but I can't get
it to work. I'm using Access XP 2003, but the Menu box indicates Access
2000 file format. My field type is OLE Object. In my form I right click on
the field box then I select "Insert Object ..." another box appears in which
I select "Create from file" I select the file (photo) and click on "OK",
but instead of seeing the expected photo I see the filename. Then if I
double-click in the field box the picture comes up in "Picture Manager".
What I'm I doing wrong? Is there anyway to just have the photo displayed
within the actual field box on the form? TIA - Rick
 
R

Roger Carlson

The usual advice is to NOT store the pictures in the database, but just
store the path to the file on the file system. Then load the picture into
an unbound image control at run-time. On my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"Picture.mdb" which illustrates how to do this.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
R

Richard Wright

Thanks for your help. I've looked at your example and I do not understand
how to do number 3 - Programmatically set the .Picture property of an Image
Box to the appropriate file in the On Current event of the form? Please
explain if you have the time. Thanks - Rick
 
R

Roger Carlson

In the Current event of the form is the following code:
DoCmd.SetWarnings False
Me.ImgStock.Picture = pathname & Me.txtStockGraph
DoCmd.SetWarnings True

The DoCmd.SetWarnings just turns off, then turns on the dialog box that will
otherwise pop up. The middle like set the .Picture property of the Image
control to the path of the picture, which I'm displaying in the
txtStockGraph textbox.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

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