How to place/overlay a textbox on an image on a form (1 Viewer)

jdraw

Super Moderator
Staff member
Local time
Today, 12:33
Joined
Jan 23, 2006
Messages
13,409
Does anyone have a link to or sample of placing a textbox or box control such that it overlays
an image on a form (Access 2016)? I'd like to be able change the colour depending on some logic.
Thanks in advance.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:33
Joined
Oct 29, 2018
Messages
13,332
Hi. Not sure what the real issue is but maybe consider, if possible, to set the image as the background image of the form? Just a thought...
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:33
Joined
Jan 23, 2006
Messages
13,409
DBG Thanks. I tried putting the image as form background and placed a few textboxes, but did not have any success in changing the textbox backcolor. If anyone has info or an example, it would be most welcome.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:33
Joined
Oct 29, 2018
Messages
13,332
DBG Thanks. I tried putting the image as form background and placed a few textboxes, but did not have any success in changing the textbox backcolor. If anyone has info or an example, it would be most welcome.
Are we talking about an image of a PDF form?
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:33
Joined
Jan 23, 2006
Messages
13,409
No. I have a png file. I have tried using it as
a)-image control
b)-form background image

In both cases when I try to place a textbox or a box as an overlay on the image, and in some process logic attempt to show a different value in the textbox backcolor or box border color, I do not see any change.
If you or anyone has a sample, I would like to see how it is done.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:33
Joined
Oct 29, 2018
Messages
13,332
No. I have a png file. I have tried using it as
a)-image control
b)-form background image

In both cases when I try to place a textbox or a box as an overlay on the image, and in some process logic attempt to show a different value in the textbox backcolor or box border color, I do not see any change.
If you or anyone has a sample, I would like to see how it is done.
Okay, not in front of a computer right now, so will have to try it later. But if you can't do it, not sure I'll be able to either.
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:33
Joined
Jan 23, 2006
Messages
13,409
Well it's more interest than need. I thought would be an interesting and "easy" interface idea, but if someone has a working example.....
 

Micron

AWF VIP
Local time
Today, 12:33
Joined
Oct 20, 2018
Messages
3,471
I held off posting earlier because I figured I must be missing something. I still think I must be, so I tried this and had no problem altering the back color of a box when it was laid over both an image control and a object frame - at least from the immediate window. No problem altering a textbox back color either. OK, so what if I add a form background pic? Seems no problem. Both the image control and background pics are jpg's. This is just a form with a whole lot of test stuff from forum questions.
The orange one is the textbox, the red, a box.

bkgrdPic.jpg
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:33
Joined
Jan 23, 2006
Messages
13,409
Thanks. I get the idea of a background image. I was thinking I could put a textbox over each of the processes in the attached image --transparent or invisible??- and then click on the control, invoke a process, then when completed change the color of the control. I'm not sure I am clear on this, but I (all of us) have a little more time on my hands and there's only so much TV etc. I'm sure others have done something like this.
 

Attachments

  • Debug.flow5.png
    Debug.flow5.png
    45.4 KB · Views: 12

Micron

AWF VIP
Local time
Today, 12:33
Joined
Oct 20, 2018
Messages
3,471
I think I get some of what you're saying. The issue as I see it is that a transparent box can't take a click event unless it's on the border. A textbox can, but if you click on what looks like part of the background image, a textbox will take on the standard appearance when it is the active control. You could alter properties and then run whatever code, but there'd be that momentary "flash". So you can do it over a background image, but there's the issue that the textbox will not only activate, the cursor will be flashing in it unless you shift the focus. That could be on a textbox with 0 width so it's not visible.
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:33
Joined
Jan 23, 2006
Messages
13,409
Ok. I have a mock up with the overlay that will do what I need. I added vertical boxes along side the process boxes to ensure I could "hit the edge". Seems more tedious than it's worth, but it is really a"proof of concept".

Debugflow_A.PNG
 

Users who are viewing this thread

Top Bottom