transparent button to open form (1 Viewer)

jonanem

New member
Local time
Today, 13:25
Joined
Jun 15, 2016
Messages
6
I have a transparent button on a continuous subform showing a list of customers.The button covers all of the text boxes so that when a user clicks ANYWHERE along the row it will open that customer's form. It works fine except when I click on the first text box in the row it won't work. Ironically, if I click somewhere else on the row it will work and if I then close the form the transparent button will work along the whole row- WHY??
 

Attachments

  • Practice.accdb
    776 KB · Views: 57

isladogs

MVP / VIP
Local time
Today, 13:25
Joined
Jan 14, 2017
Messages
18,216
When the form is opened the cursor moves to the first field in the tab order of the subform
So its already in Customer Name field & the code won't fire
It will fire if you move elsewhere e.g. customer name in the 2nd record or any other field and then move back to the first field in the first record.

The fix is easy. Change the tab order in the subform so the button is first in the list.
See attached
 

Attachments

  • Practice-CR.accdb
    588 KB · Views: 62

jonanem

New member
Local time
Today, 13:25
Joined
Jun 15, 2016
Messages
6
Wow! Thanks so much for your ultra speedy response. I guess that also explains why I can click on the first text box once the form is reopened. Question is how do you get to know all this stuff?
Anyway thanks again!
jonanem
 

isladogs

MVP / VIP
Local time
Today, 13:25
Joined
Jan 14, 2017
Messages
18,216
You're welcome
TBH I had a good idea before I opened it what the cause would be ....
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:25
Joined
Feb 19, 2013
Messages
16,607
other way is to ditch the transparent control and use the form current event

Ah - except that will fire when the form opens which may not be a required behaviour

ditch this idea!
 

Users who are viewing this thread

Top Bottom