Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Images to Access DB 1

Status
Not open for further replies.

donnellk

Instructor
Jul 22, 2002
1
US
I would like to create Student ID cards.
I have a Access DB with their info, including their ID numbers. I also have a folder of jpeg images named by their ID numbers.
I would like to link these and print reports, without inserting the images in the Access DB. I have 2000+ students.
Techno/Teacher is stumped.
 
Hiya,

There may be a more elegant way but....

Paint an image control on your form, you'll be prompted for a file name (jpg, bmp file etc). You should first create a 'dummy' jpg (it can just be blank) and point it to this 'dummy' file.

At runtime and at the moment where your student record is loaded into the form (eg in the 'On Current' event) set the 'Picture' property of the image control to point to the required jpg.

In the 'On Current' event have code similar to this...

MyImage.Picture = "C:\mydata\images\id12345.jpg"

Where 'MyImage' is the name you gave to the image control. The directory and filename will obviously be different for you.

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top