OLE Linking

  • Thread starter Thread starter Mark Belton
  • Start date Start date
M

Mark Belton

I have a database of all current staff and a folder full of images (.jpg) of
each staff member.

I want a field on the form which will automatically display the image,
without having to insert each image for each staff record.

Does anyone know how I can setup a OLE field which automatically place the
image using the staff members name as the index (i.e. the image is titled
FirstLastname.jpg)

Many thanks in advance!
 
On your form create an image field, I'll call it imgStaff. When it asks for
a picture just pick any file. For simplicity pick soemthing that isn't even
a picture. Then in the Current event of the form use

imgStaff.Picture=Application.CurrentProject.Path & "\Photos\" & First &
LastName & ".jpg"

This will update the image for each record on the form. This assumes the
pictures are in a directory called Photos in the directory of your database.

Kelvin
 
Back
Top