473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 17703
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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,...
0
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...
0
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
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...

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.