Solved

Color around command button that gets focus when form opens

Posted on 2014-11-12
9
242 Views
Last Modified: 2014-11-14
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?
0
Comment
Question by:SteveL13
  • 4
  • 3
9 Comments
 
LVL 33

Expert Comment

by:Mike Eghtebas
Comment Utility
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.
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
Comment Utility
Just curious: Why would you NOT want the user to know where the focus is on the form? That is basic Windows user conventions, and in general it's not a good idea to go against those sort of ingrained paradigms. Users are accustomed to looking for an object that has the focus ...

That said: You might be able to include a veeeeery small button on the form, and give that the focus when the form starts. Users would very likely not see it (and you could perhaps hide it behind something else) - but that still begs the question of why you don't want the user to see it ...
0
 

Author Comment

by:SteveL13
Comment Utility
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.
0
 
LVL 33

Accepted Solution

by:
Mike Eghtebas earned 250 total points
Comment Utility
Now that your concern is known. Have a textbox with width = 0 and intedex tab of zero. The same effect as a small button but unlike a button, it will now show a helo. Samll button, no matter how small will still get helo.

Mike
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 33

Expert Comment

by:Mike Eghtebas
Comment Utility
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
0
 

Author Comment

by:SteveL13
Comment Utility
I have requested attention.
0
 
LVL 33

Expert Comment

by:Mike Eghtebas
Comment Utility
Thank you very much.
0
 

Author Closing Comment

by:SteveL13
Comment Utility
Awarded to both experts.  Thank you to both of you.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now