PC Review


Reply
Thread Tools Rate Thread

Disable Focus on Command Buttons

 
 
John Michl
Guest
Posts: n/a
 
      5th Oct 2006
I have a simple form with two command buttons. The user votes for one
of two options by clicking the appropriate button. Currently, when the
form opens it appears that the first button has focus. I don't want
either button to have focus to avoid "leading" the user to one button
over the other.

How can I disable focus on the form?

Thanks.

- John

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      6th Oct 2006
John,
Add a Frame to the form and make it first in the tab order.
Do not place the buttons on it, but place it between the
two buttons and set its height (or width) to ~1.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"John Michl" <(E-Mail Removed)>
wrote in message
I have a simple form with two command buttons. The user votes for one
of two options by clicking the appropriate button. Currently, when the
form opens it appears that the first button has focus. I don't want
either button to have focus to avoid "leading" the user to one button
over the other.
How can I disable focus on the form?
Thanks.
- John

 
Reply With Quote
 
=?Utf-8?B?SGFsaW0=?=
Guest
Posts: n/a
 
      6th Oct 2006
Hi John,

Set the commandbutton with Tabstop = false
like :

Private Sub UserForm_Initialize()
CommandButton1.TabStop = False
End Sub


--

Regards,

Halim


"John Michl" wrote:

> I have a simple form with two command buttons. The user votes for one
> of two options by clicking the appropriate button. Currently, when the
> form opens it appears that the first button has focus. I don't want
> either button to have focus to avoid "leading" the user to one button
> over the other.
>
> How can I disable focus on the form?
>
> Thanks.
>
> - John
>
>

 
Reply With Quote
 
John Michl
Guest
Posts: n/a
 
      6th Oct 2006
Jim - Thanks for the advice. Worked like a charm.

www.johnmichl.com


Jim Cone wrote:
> John,
> Add a Frame to the form and make it first in the tab order.
> Do not place the buttons on it, but place it between the
> two buttons and set its height (or width) to ~1.
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware
>
>
> "John Michl" <(E-Mail Removed)>
> wrote in message
> I have a simple form with two command buttons. The user votes for one
> of two options by clicking the appropriate button. Currently, when the
> form opens it appears that the first button has focus. I don't want
> either button to have focus to avoid "leading" the user to one button
> over the other.
> How can I disable focus on the form?
> Thanks.
> - John


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable All Command Buttons =?Utf-8?B?TG93cmlkZXI3Mg==?= Microsoft Access 1 21st Dec 2005 02:07 AM
Command Buttons and focus/enabling problems Rob Microsoft Access Forms 1 19th Dec 2003 10:26 AM
check user then disable/enable command buttons john Microsoft Access Form Coding 2 1st Dec 2003 06:53 PM
Filter by form disable all command buttons Richard Lui Microsoft Access Forms 1 18th Jul 2003 02:48 AM
Re: Disable Menu and command buttons Tom Ogilvy Microsoft Excel Programming 0 14th Jul 2003 01:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:59 AM.