Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Color around command button that gets focus when form opens

On a form I have a command button.  I have that command button getting the focus when the form opens with:

Private Sub Form_Open(Cancel As Integer)

    Me.cmdExit.SetFocus

End Sub

Open in new window


But then the command button gets a blue color around it because it has the focus,  Is there a way to change this so there is no color around it?
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

You possibility could replace this button with a label and make it look like a button.

You can use its click event and press event feature could be added to it all minus that blue line.

Such a label will not get focus period.
SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

The form is really just a launchpad with command buttons that execute other forms or reports.  By design I have the exit command button being the focus but then the blue "halo" around it.

I will try the small button under another object.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you but this should be shared with Scott for asking the essential question I failed to ask. If you could use Request Attention to reopen and the question to share the points.

Regards,

Mike
I have requested attention.
Thank you very much.
Awarded to both experts.  Thank you to both of you.