Access Problem

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi All

I need some help in writing a Module in Access 97. I have searched through
the help files and on Microsoft's website and can not find the answer I
need. The problem is this:

There are two fields in a table. One contains the name of an image e.g
widget.bmp. The second field is a OLE object field, which is empty.

I need to find a way of linking an image into the OLE field automatically,
without any user intervention, using the first field as the file name. In
other words I could have some VB code looked at the first field as its
variable for the image name and inserted the image widget.bmp into the
second field.

Therefore the VB code would be saying:

Link into the OLEfield "C:\images\" & firstfield & ".bmp"

The code would run through the file adding the correct image to each record.

I have got two databases that need to do this, one stores product contracts
(they want the product image on the contract) the other card designs so the
IT departments reputation is on the line.

Any pointers anyone?

Cheers in advanced
Chris
 
There are sample databases that you can download from
http://accdevel.tripod.com which illustrate three approaches to handling
images in Access, one of which shows code for setting an OLE Object.
However, I suggest reading the article that is included in the download --
one of the other approaches may be more useful.

Larry Linson
Microsoft Access MVP
 
Hi Larry

Brilliant! I have downloaded the database and it helps enormously.

Much appreciated.
Chris
 
Back
Top