Solved

Import a JPG picture into Access by Command or ?

Posted on 2004-08-26
6
366 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
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

815 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now