473,903 Members | 4,521 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 1928
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!

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*********@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!

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:\MyContactDat abase\BusinessC ards\JoeBlow.Jp eg. 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******@pcdata sheet.com
www.pcdatasheet.com


"ColinWard" <je*********@ho tmail.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
12865
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 probably been discussed before but. I am wanting to do some scripting to automate a few administration tasks, one of the first tasks is automating FTP file transfers.
7
2635
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 not Work' It appears that the type of object returned from the "AllReports" collection is not a report object. =>> I need it to be an object of type report.
20
2416
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 used the autoshapes to create this diagram). I was wondering what the best way to incorporate this into the DB. I have read about how saving them as pictures in the DB bloats the size, which is unacceptable, but it needs to be easy to do (not...
1
1664
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 (eg. picture.jpg , video.wmv ) so that instead of showing file contents there would be a redirection to an authentication form ? The idea here is to prevent direct / hotlinking to my web site resources.
4
3237
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 can use the reports that have already been created. I have somewhere in the region of 200 reports already created in MS Access and I really don't want to have to create new ones. I have successfully linked to the Access ADP, but would really like to...
4
12869
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, which becomes invalid when the user installs the database (ie: c:\devpath\ becomes c:\program files\mydbapp, but the .Picture property still points to c:\devpath\) The problem is that I don't *know* what installation path the user will select,...
3
1833
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 picture to display on the screen and most importantly to display on a report. Any clues on this? Thanks!
0
1014
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 the user. #this code defines that the edges have a place on the grid. def join_point(self, type): orect = self.orig_image.get_rect() if type == "north": return ((orec.width/2, 20))
6
10793
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 following code" Private Sub Report_Load() Set cnn = CurrentProject.Connection 'Table containing Logo Path rst.Open "tblClientDetails", cnn, adOpenDynamic, adLockBatchOptimistic With rst
0
9999
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9847
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9684
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7206
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5894
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4308
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3324
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.