want a subform to display, add and remove images

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hi.

I need a subform that will display images associated with the record
in the main form. The image pathnames are stored in a table that is
related to the records displayed in the main form. Each record
displayed in the main form could have any number of images associated
with it. I want to display all the images associated with the record
on the subform at the same time, and I want to be able to click on a
delete button next to each image in the subform to remove its record
from the images table and delete it from the subform.

I'm planning to programatically add image controls to the subform when
the record is selected, one for each image, and link the images to the
controls in order to display them. My problem is: How can I
programatically create a command button for each image that will
execute code to delete the image? Is there an easier way to do this?

Thanks!
 
Set up the subform as a continuous form. On this subform have in image
control and what ever buttons you want. As a contunous form, these controls
will automatically get repeated for entry. Then just code your buttons to
perform the action on only that current record.

Kelvin
 
Back
Top