Hi Colin,
Store your pictures in a common folder say C:\MyDatabase\P ictures\. You should
then have a list of the path to your pictures that looks like:
C:\MyDatabase\P ictures\MyPictu re1.BMP
C:\MyDatabase\P ictures\MyPictu re2.BMP
C:\MyDatabase\P ictures\MyPictu re3.BMP
C:\MyDatabase\P ictures\MyPictu re4.BMP
etc
Create an Access table named TblMyPicture with the following fields:
MyPictureID
PicturePath (text data type)
<Other fields you want for the pictures>
** The above paths to your pictures goes in the PicturePath field.
Create a form based on this table. Use a textbox named PicturePath for the
PicturePath field and set its Visible property to NO. Add an unbound image
control found in the toobox to your form. Name the image control MyImageControl.
Put the following code in the form's Current event:
Me!MyImageContr ol.Picture = Me!PicturePath
Your pictures will now display in your form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com www.pcdatasheet.com
"ColinWard" <je*********@ho tmail.com> wrote in message
news:3f******** *************** @news.frii.net. ..
Hello again.
I am trying to figure out how to link a picture to a record from code. I
have figured out how to get the proper dialogue box to open but I still
have to manually check off the Link checkbox. Is there a way to automate
the checking of this box? I am not doing any of this through code
because when I tried that, I could not make it work from code so I am
simply using the default behaviours of the bound object frame.
I hope this is clear.
Thanks for all your help now and in the past (and future?)
Colin
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!