473,503 Members | 1,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1902
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
12833
by: Limey Drink | last post by:
Hi all, Firstly :-) , is there any where I can search through archived newsgroup posts so I am not cluttering up the newsgroup with repeated queries ? And secondly :-), I know this has...
7
2612
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
20
2369
by: Greg | last post by:
I'm fairly new to access (using 2002) and am setting up a DB for work. along with each record the user also needs to make a flow diagram (previously, these reports were composed in word and they...
1
1642
by: Petri | last post by:
Dear newsreaders, Access to aspx-pages can be prevented for example checking authentication cookie on page_onload part of code. But is there any way to prevent direct access to indivual files...
4
3214
by: Supa Hoopsa | last post by:
I am in the process of rewriting an MS Access application (access front end with SQL 2k database) in VB.NET and one of the things I would like to do is link in to the compiled Access ADE so that I...
4
12814
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
3
1809
by: Parasyke | last post by:
I have a form that has a bound textbox displaying a picture path (in another folder) for an image (e.g. C:\Documents and Settings\My Documents\My Pictures\SymbolVRC 6940.jpg). I need this actual...
0
975
by: Joseph king | last post by:
well so far the problem for me is not the linking i have a kinda good code for that. here is a little snippet of the idea that i used on an old version that split the picture without input from...
6
10466
by: iheartvba | last post by:
Hi, I am trying to link a picture to an access report as follows: 1. The location of the Picure is stored as a hyperlink field in a table 2. The On Load Event of the report triggers the...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.