create (dynamically) image objects on a form

  • Thread starter Thread starter Roland_1
  • Start date Start date
R

Roland_1

Guest
I have a table filled with a column where I can store a path to an image. On a form I have an image object to display this image. This image is connected with several records in another table.

In this table I register several modell trains/wagons. A train wagon is part of a train serie. E.g. trainwagon 1 is part of the Santa Fe express, etc.

I would like to show with the stored pictures/photos the train composition based on the data.

Because I don't know the amount of (stored records) wagons in a serie I would like to make a form where I can place a image object dynamically.

For example: if a train serie exists of 3 wagons I would like to show 3 pictures. If I add a wagon to the serie, I would like to show 4 pictures.

I don't want to make/predefine a form with a lot of empty image objects.

Is it possible to call/create a form (object) with vba code and then
create (dynamically with VBA code) several image objects?

Roland
the Netherlands
 
It would actually be easier pre-placing the imageholders on the form and populating the images when you need to. The reason I say this is because you already have the image position ready set and will not need a lot of code to position the image on the form. Just because the imageholder is on the form, it does not have to appear empty:)
 
Fizzio said:
It would actually be easier pre-placing the imageholders on the form and populating the images when you need to. The reason I say this is because you already have the image position ready set and will not need a lot of code to position the image on the form. Just because the imageholder is on the form, it does not have to appear empty:)

I think you're right, it is the easiest solution.
 

Users who are viewing this thread

Back
Top Bottom