473,665 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9042
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
1856
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 and will additionally have the following functions on it: Print, Save (CSV), Import (CSV). 3. On top of that the program will function - solely as a stand-alone program. I want to be able to modify the fields from within Access and for
12
20904
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 contains the paths to the pictures. The database consists of two tables: TABLE DATA ID Name LastName
70
3367
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 I should stay with Access or move the DB to SQL. I'm trying to come up with a list of Pros/Cons for such a move. My list is a bit lopsided, as I have very little experience with SQL and quite a bit with Access. PROS for moving to SQL:
23
2777
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 selection listbox would be better so that you can search for a pair or more of people at a time but the query that makes this happen is giving me a run for my money. I’m unsure as how to proceed and so I’m hoping someone can help me out. My...
1
5767
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 stored in a directory under where the Access .mdb file is. For instance, in c: \MontvillePics, there exists MontvillePics.mdb. Then under c: \MontvillePics\pics are the actual .jpg files. Right now, I have the paths hard coded with those...
0
1307
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, Tifs, BMP etc the pictures appear on the forms and reports. However when I select .JPG format they don’t appear, no error message simply a white square where the picture should be. I have used this database for several years on a different PC...
2
5222
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 text and numbers. There is a web page http://www.frontendsolutions.ca that shows it uploading pictures. Can Access upload pictures to a SQL server database running on the Web? Thank you.
3
2104
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, there is a folder containing jpegs of the employee pictures. When either person brings up an employee's file, the computer goes into the network and downloads the picture and displays it on the screen as part of the form. Works fine, EXCEPT: ...
9
4485
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 like to know is the stability, speed & ease of use of both the products. I believe Access 2007 has a new file format too and that it may be slower.
0
8438
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
8348
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
8863
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...
1
8549
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
7376
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
5660
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
4186
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
2765
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
1761
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.