Pulling pictures inot a form ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a directory on my hard disk, with e.g. 100 pictures. I wish to
allocate e.g. Picture 1 to record 1, Picture 2 to record 17............... in
my database, I am trying to do this programmatically, now gettting stuck ?!
I have done this by getting the picture inot the image box, but then the
same picture stays for all records
Any help mosy welcome, thanks Al
 
hi,
you need to put the file path of the pictures in your
table. this way access can associate a picture with a
record. to change the picture you reset the image
control's picture property to another file path.
you can do that with dlookup.
Me.Image6.Picture = DLookup("[filepath]", "Atable", "[id]
='" & Me.Text0 & "'")
where filepath is the filepath in your table
ATable is the table
id is your record identifier in the table
and me.text0 is a text box on your form where you entered
the record identifier.
 
Back
Top