469,953 Members | 2,370 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,953 developers. It's quick & easy.

Automating picture linking


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!
Nov 12 '05 #1
4 1744
Hi Colin,

Store your pictures in a common folder say C:\MyDatabase\Pictures\. You should
then have a list of the path to your pictures that looks like:
C:\MyDatabase\Pictures\MyPicture1.BMP
C:\MyDatabase\Pictures\MyPicture2.BMP
C:\MyDatabase\Pictures\MyPicture3.BMP
C:\MyDatabase\Pictures\MyPicture4.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!MyImageControl.Picture = Me!PicturePath

Your pictures will now display in your form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"ColinWard" <je*********@hotmail.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!

Nov 12 '05 #2
If you have compelling reasons to use OLE Objects, you'll find code that
illustrates a programmatic method in the sample databases you can download
from http://accdeve.tripod.com. They also illustrate two other approaches
that you may find more efficient than using OLE Objects, and an article that
will explain why.

Larry Linson
Microsoft Access MVP

"ColinWard" <je*********@hotmail.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!

Nov 12 '05 #3

Thank you both for your suggestions. Larry, the site you gave me
http://accdeve.tripod.com didn't seem to be working.

I think I have to give some more details as to what I am trying to
accomplish. The database is a contact database and I want to be able to
have the contact's business card on the same page as the contact's
informatiion. so in the Contacts Table I have a BusCardPicture field and
on the Contacts form I have a Bound OLE Object frame. when I right-click
I can then choose Insert Picture from the context menu which briings up
the insert object Dialog. What I want to automate is the selections the
user makes in this dialogue(I.E type of file, link or embed etc.) the
business cards will be scanned into the computer as jpegs.
I hope this gives you a little clearer picture of what I am trying to
do.

thanks again for your help

Colin


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4
Colin,

Follow the instructions in my previous post. Scan the business cards and store
them all in a common file such as
C:\MyContactDatabase\BusinessCards\JoeBlow.Jpeg. Store this path in the record
for each contact. A Bound OLE Object frame is the wrong control! Use an image
control on your form.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


"ColinWard" <je*********@hotmail.com> wrote in message
news:3f***********************@news.frii.net...

Thank you both for your suggestions. Larry, the site you gave me
http://accdeve.tripod.com didn't seem to be working.

I think I have to give some more details as to what I am trying to
accomplish. The database is a contact database and I want to be able to
have the contact's business card on the same page as the contact's
informatiion. so in the Contacts Table I have a BusCardPicture field and
on the Contacts form I have a Bound OLE Object frame. when I right-click
I can then choose Insert Picture from the context menu which briings up
the insert object Dialog. What I want to automate is the selections the
user makes in this dialogue(I.E type of file, link or embed etc.) the
business cards will be scanned into the computer as jpegs.
I hope this gives you a little clearer picture of what I am trying to
do.

thanks again for your help

Colin


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Limey Drink | last post: by
4 posts views Thread by Supa Hoopsa | last post: by
3 posts views Thread by Parasyke | last post: by
reply views Thread by Joseph king | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.