473,497 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Linked Pictures

How do I make Access display pictures within a form view as linked objects,
so that the pictures which I am linking to are displayed within the
database? I have a seperate folder for pictures to be placed in, and I have
two pictures per record.

Nov 12 '05 #1
2 17707
There are a few ways to do this in Access. One way is to create a table
which contains an OLEobject field. Here you can link you pictures or
embed them, one picture per row. The you create a form which is based
on this table. In the field list you just add the field(s) to your
form. When you navigate through the recordset, each picture you link to
a record will be displayed in a bound Object frame (which will be
created automatically when you add the field list to your form from the
field list tab on the toolbar of the form in design view).

Another way is to create a form and plant an image control (which is
located on the toolbox toolbar in the form's design view). With this
option you don't need a table. You could list your pictures in an array
and cycle through them in a command button. Code something like this:

Private Sub Command1_Click()
Dim arrPics As Variant
Static i As Integer
arrPics("c:\picdir\pic1.jpg","c:\picdir\pic2.jpg", ...)
If i < Ubound(arrPics) Then
Image1.Picture = arrPics(i)
i = i + 1
Else
i = 0
End If
End Sub

This second example will cycle through the array arrPics until the end
of the array (Ubound(arrPics)). The image control here is called
Image1. Use the Picture property of Image1. Image1.Picture = "Path of
picture to display". When i exceeds Ubound(arrPics) it gets reset to 0
and you start all over again. This routine is a little bit more
flexible than the table routine.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2
You really don't want to embed images in Access as a field. They are always
converted to BMP files, and therefore the database gets large fast. I've
done it this way. Create a text field in the table where you want to store
the picture, and put the path to the picture there. Then on your form,
create an Image object, and in Form_Current() place something like:
Me![ImageFrame].Picture = Me![fImagePath]

Hope this helps.

cheers,
Matt.

"Charles Robinson III" <ro******@saiyanprincefox.cjb.net> wrote in message
news:8n**************@newsread1.news.atl.earthlink .net...
How do I make Access display pictures within a form view as linked objects, so that the pictures which I am linking to are displayed within the
database? I have a seperate folder for pictures to be placed in, and I have two pictures per record.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3351
by: Bob Bedford | last post by:
I've been able to parse the XML files used to update my database. Now, I receive image in XML files, like this: <PICTURES COUNT="3" CDATA="1"> <PIC NR="1"><!]></PIC> <PIC...
0
2012
by: JakeC | last post by:
Hey all, I'm currently redesigning a website that a friend and I started about a year ago. It is a daily surf report so when choosing the best script/language to use for the new design, I found...
1
5453
by: Sven Steinacker | last post by:
Hi, XSLT files generated by Microsoft InfoPath applied to an applicable XML file produces quite decent HTML presentations. At least with Mozilla and, of course, IE 6.0 the results look the same...
0
1272
by: Marcel - IDUG Europe 2005 | last post by:
Visit the blog for a virtual experience of the conference. Check out the blog at: http://idugeurope.blogspot.com Here are some previous posts: - Pictures Live on Tuesday
12
20845
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
1
2061
by: chrisse_2 | last post by:
I am going to try and explain what i think is happening in my form. The records in my database each contain pictures. In some cases multiple pictures. I have linked these images to my database...
1
1673
by: suresh_punniyakkodi | last post by:
Hellow, I am suresh, i am developing one project in VB. I need your help. My question is how to zoom pictures(zoom in and zoom out) in Visual Basic (like Photo Editor). ...
4
7234
by: Zeljko Bilandzija | last post by:
Hy, could someone help me in this: In design mode, i want to put pictures in database. I made column named pics, and its type as image. How can I put pictures or some address of these pictures...
2
2966
by: Tyler | last post by:
I need to have a form that displays a group of 20 pictures in 4 rows of 5 pictures. The pictures are of people. Each Subject record has a picture field. I have a query written that selets the...
0
6991
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...
0
7160
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,...
1
6878
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
7373
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...
0
5456
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,...
1
4897
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
1405
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 ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
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.