473,409 Members | 1,967 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,409 software developers and data experts.

Access and pictures

Good evenig to all,

I use Access 2000 and i want to build a database for my
photographs (jpeg files). All the 3 methods I saw
make the base grow up. Is it a activeX control which could
display the picture without importing it in the base ? and where
could I find it.
Thank you

Alan
--
_________________________________

Site photo personnel :

http://perso.wanadoo.fr/dimphoto
Nov 12 '05 #1
2 9019
The way to view photos in Access without storing the photos in Access is
to store the photos in some directory specifically designated for your
photos. Then you can use the Dir function to retrieve the location of
each photo in the directory and display it in an Image control on a form
in Access:

Sub GetPics()
Dim Pic As String, Path As String, i As Integer
Path = "C:\PicDir\"
Pic = Dir(Path & "*.jpg")
Do While Pic <> ""
Image1.Picture = Path & pic 'Path and Picture argument
msgbox "Pause"
Pic = Dir
Loop
End Sub

This loop is real basic. The Dir function retrieve the Picture name and
appends it to the Path that you have specified. You assign the Path &
Pic to the Image1.Picture property. Then I call a msgBox function to
pause the loop so you can view the picture. When you click OK on the
Pause Message the loop continues and picks up the next picture in your
directory.

Instead of a simple loop like the one above, you could retrieve all the
pictures into either an array or even a collection object. Now you can
specify the index of the object containing your list of pictures to view
a specific picture, or you could loop through the object/array as above.
Instead of using a loop, also, you could use a Static counter (Static i
As Integer). This way you could click on a button and increment your
counter without losing the previous value and view your pictures that
way.

Say you have loaded a Module Level array with your pictures, you can
click through the array with the procedure below:

Private Sub cmd1_OnClick()
Static i As Integer
i = i + 1
If i > Ubound(PicArray) Then i = 0
Image1.Picture = PicArray(i)
End Sub

Just some ideas.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2
There are downloadable sample databases illustrating three approaches to
handling images in Access databases at http://accdevel.tripod.com. Feel free
to use the code as a starting point if it meets your needs, but understand
those are just examples, not "polished applications".

Larry Linson
Microsoft Access MVP

"Alain." <_@wanadoo.fr> wrote in message
news:bj**********@news-reader1.wanadoo.fr...
Good evenig to all,

I use Access 2000 and i want to build a database for my
photographs (jpeg files). All the 3 methods I saw
make the base grow up. Is it a activeX control which could
display the picture without importing it in the base ? and where
could I find it.
Thank you

Alan
--
_________________________________

Site photo personnel :

http://perso.wanadoo.fr/dimphoto

Nov 12 '05 #3

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

Similar topics

2
by: Jonathan \(Pickles\) Sklan-Willis | last post by:
Hi All, This is what I want to do: 1. Build a database in Access with certain queries and a query form. (DONE). 2. I now need to use the same form as a form in VB, this will be the front page...
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...
70
by: lgbjr | last post by:
Hello All, I've been developing a VB.NET app that requires the use of a DB. Up to now, I've been using Access. It's a bit slow, but everything works. I'm at a point now where I need to decide if...
23
by: Bosnoval | last post by:
Access 2003 Databse ASP.NET 2 Win 2003 Server Currently I have a search page that only allows a single keyword (person) to be searched at a time. I thought upgrading that option via a multiple...
1
by: mikebian | last post by:
I created a db that houses info about pictures that were scanned into the PC. The pictures are stored on the file system. I have a form coded so that it shows thumbnails of the images, which are...
0
by: Ian | last post by:
I have an Access 2000 database in which I display many pictures on reports, the pictures are not embedded, the database just stores the path to where the pictures are stored. When I select Gifs,...
2
by: briggsbpc | last post by:
I am a FileMaker developer and have been since Version 5.0... that long. FileMaker 9.0 has promised to hook up to SQL server and MySQL databases. When I hook up I can not upload pictures just...
3
by: Paul Brady | last post by:
I have two users, Andrew and Nancy, who each have their own computer and can connect to a common database called "employees.mdb" which resides on a network server. On that same network server,...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
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...

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.