Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Import a JPG picture into Access by Command or ?

Posted on 2004-08-26
6
Medium Priority
?
372 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 500 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

916 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