Link to home
Start Free TrialLog in
Avatar of sglee
sglee

asked on

Embedded Picture in ACCESS 2003

Hi,
 
  I created a table that has part information - Part number, description, PICTURE ... etc.
  I have Pictures in BMP format and I created filenames for them and stored them on the network older.
  How can I create a Part data entry screen where I can display the photo of each part WITHOUT storing BMP file as a part of the MDB because I know it will make the MDB larger real quick.
 I created a text fileld which stores the file name and path of the part picture. I like my parts form to go grab & display the picture based on the filename and folder location stored in the field on the same record.
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

"because I know it will make the MDB larger real quick. "
Just be aware of this product, which avoids that issue:

You might want to consider this or at least be aware of if you are dealing with images in an Access database ... and I can totally vouch for this program.  
http://www.ammara.com   >>> DBPix ...

It does *all* the work for you. Examples show how to add a simple 'control' panel to Load, Save, Zoom In/Out, Size To Fit and much more.  AND ... virtually eliminates BLOAT associated with storing images in an Access MDB. I have 3 clients who sell commercial run-time products that use DBPix.

Note. I have no connection with DBPix ... except I have used it many times ...

mx
Avatar of sglee
sglee

ASKER

DatabaseMX:
Thanks. I will try it and get back to you.
Avatar of sglee

ASKER

DatabaseMX:
I downloaded DBPix from their website and installed the program on my computer.
What am I supposed to do next?
Do I create my tables and forms in the sample database or
the installation of DBPIX program has applied necessary updates to my ACCESS 2003;therefore use my own ACCESS 2003 and use the new control/feature?
"therefore use my own ACCESS 2003 and use the new control/feature?"
Yes ...
Look at the sample db for code, etc.  Also, how to set up a control panel for handling images.  Pretty sure that are on KB's on the website.

I haven't looked at the demo db for some time now.

mx
Add a text field to your tblParts named PicPath  -  it would contain values like c:\PicData\Part1.bmp.  In the form displaying the part info add a new unbound Image control named imgPic. In the form's Current event add this code:

Private Sub Form_Currrent()
  Me!imgPic.Picture = Me!PicPath
End Sub
Avatar of sglee

ASKER

GRayL:

 Is this based on DBPix solution or pure VB coding in ACCESS 2003 without 3rd party solution?
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee

ASKER

boag2000:
Thanks for the real example. I tried it and worked well.
It does not look like it is storing the actual image in the database, so I don't have to worry about database size getting big over the time either.
This solution kills two birds with one stone.
Thank you again.