Solved

Import a JPG picture into Access by Command or ?

Posted on 2004-08-26
6
368 Views
Last Modified: 2012-05-05
I have a Access 97 Database with a Field Name as a OLE Object that is attached to a form.  A single picture will be put on a floppy and I need to be able through a macro or command import the picture to the record that the form is on and attach to the field.  Any Help would be greatly appreciated.

Mike
0
Comment
Question by:Flavio_00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 125 total points
ID: 11910012
Don't do it. Importing a picture into a field will result in HUGE database bloat, since Access will essentially decompress your JPG file inside the OLE field. A 30K JPEG file can result in your DB increasing in size by 1MB!!

Instead, copy the picture to a specified location, save the picture's path in the record, and use an Image control on your form. You can set the control to show the picture by using its Picture property.
0
 
LVL 5

Expert Comment

by:Emanon_Consulting
ID: 11910258
MS Access has issues with storing .jpg images in an OLE object field.

Here's a link to a MS Article that covers the Bloating effect of storing images and how to store the file path to the image instead.
http://support.microsoft.com/default.aspx?scid=kb;en-us;285820&Product=acc2003

And here is a link to Alan Warrens web site that gives another alternative using Binary Long Objects (Blob’s).  Good sample here.
http://www.cashoz.com/samples/blobs.asp

Check out this post to get the FilePicker to pick the image.
http://www.experts-exchange.com/Databases/MS_Access/Q_21095227.html


Questions?

Cheers
Michael
0
 

Author Comment

by:Flavio_00
ID: 11927857
Those links never came up.  Here is a little more background of the program.  It is for a Law Enforcement Agency and it is an arrest booking program.  The pictures are going to be a mug shot.  As of right now there shouldn't be to many files on it and they do not need to be archived.  Each officer will use this program on there laptops and will not be centralized.  They use a Web Cam to take the pictures most of the officers are not computer literate that is why I need to be able to click a button and have it import the file from floppy to the current record they are working on.  I can use any additional help or comments.  I am keeping it really simple and dummy proof.

Mike
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 11927885
If you include a bound OLE object on the form, the user can right-click on it and choose "Insert Object". That might be the simplest way.
0
 

Author Comment

by:Flavio_00
ID: 11928106
Would there be a way to code a button to automatically import the pic on the floppy into the form.  They floppy will only contain 1 pic and it is in jpg format
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 11928159
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question