473,804 Members | 2,711 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 1921
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
12862
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
2631
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
2403
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
1661
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
3234
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
12855
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
1827
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
1009
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
10705
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
9704
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
10561
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
10318
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9132
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...
1
7608
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
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
5505
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
4277
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

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.