Picture Overlays to a Sub Form (1 Viewer)

Compmike19

New member
Local time
Today, 10:47
Joined
Feb 2, 2023
Messages
3
Is there an automated way to populate a sub form with an image in the same position to overlay another image if a checkbox is checked from a table. Would I have to lay an image object for every record manually?

This is for a video game map. The base map is 100x100 pixels, then each map modification will overlay a 100x100 pixel image (mostly transparent) with a few pixels not. I can lay them manually, then toggle them with the checkbox, but would like for Access to read each record, create a picture object in the same location, load it with the filename from the field, and set it invisible unless the checkbox is marked. Is this possible? I have almost 400 images to overlay, manually sounds tedious and inefficient.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:47
Joined
Feb 19, 2002
Messages
43,275
You can change the picture property of the form to replace the image. I don't believe this is bound the way the bound object frame is.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:47
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

Are we talking about a continuous form?
 

Compmike19

New member
Local time
Today, 10:47
Joined
Feb 2, 2023
Messages
3
Single form, the map image and overlays would be the constant, be they in a sub form, or the main form. I do not want to replace an image but to have an image (mostly transparent overlay) in place for every record and visible based on the true/false checkbox field of the record.
 

Compmike19

New member
Local time
Today, 10:47
Joined
Feb 2, 2023
Messages
3
In a file folder, Filename in the table, using the ControlSource is fine. So, it still looks like I have to manually place an Image control for each record, to reference the field so I do not overwrite the image.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:47
Joined
Feb 19, 2002
Messages
43,275
Yes. However, you might be able to make a bound object fill the whole form and then place the controls on top of it. I would still not embed the pictures in the database, I would still just store the path.
 

June7

AWF VIP
Local time
Today, 07:47
Joined
Mar 9, 2014
Messages
5,472
In a file folder, Filename in the table, using the ControlSource is fine. So, it still looks like I have to manually place an Image control for each record, to reference the field so I do not overwrite the image.
I am not understanding this. An Image control can dynamically display image per record, just like any other data control dynamically displays data.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:47
Joined
Feb 19, 2002
Messages
43,275
We're talking about using the picture property of the form since the OP seems to want a background image. That isn't data bound. As I said, you can stretch a bound object control to cover the whole form and place controls on top of it if you want the image to change automatically.

Using the picture property is probably going to be easier and all it takes is ONE line of code in the Current event of the form to populate the path to the image.
 

Users who are viewing this thread

Top Bottom