Solved

Import a JPG picture into Access by Command or ?

Posted on 2004-08-26
6
369 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

631 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