Button highlight (1 Viewer)

access17401

Registered User.
Local time
Today, 06:44
Joined
Aug 24, 2017
Messages
33
I am sure there is an easy way of doing this but i can not work it out or find an answer anywhere.

I have a form, with 4 input fields and a button to go to the next record.

I open up on the first field and you can see the cursor, as i tab through, set up via tab order, you see the change in focus, except when you get to the 'next button' you don't notice that it is in focus.

How can i make the button change color as it become the focus, so it might be blue and i tab to the button and it turns red.
 

isladogs

MVP / VIP
Local time
Today, 13:44
Joined
Jan 14, 2017
Messages
18,186
look in the property table for your buttons and you'll see a list of properties for button colours.

Depending on your version of Access you can do that by using Office themes for your buttons
 

moke123

AWF VIP
Local time
Today, 09:44
Joined
Jan 11, 2013
Messages
3,849
in the format properties of the button you can change backcolor, hovercolor, etc. but i dont think hover or pressed colors fire when tabbing.

you can use the got focus and lost focus events to change the backcolor or change the borderwidth to highlight the control which works when tabbing.
 

isladogs

MVP / VIP
Local time
Today, 13:44
Joined
Jan 14, 2017
Messages
18,186
Attached is a simple demo to show how you could achieve the effect you want




NOTE: The only button that has any code is the Exit button
 

Attachments

  • ButtonGotFocusDEMO.accdb
    448 KB · Views: 183
  • Capture.PNG
    Capture.PNG
    10 KB · Views: 604
Last edited:

access17401

Registered User.
Local time
Today, 06:44
Joined
Aug 24, 2017
Messages
33
That is perfect, just what i wanted and worked a treat. Thank you
 

Users who are viewing this thread

Top Bottom