Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Click on Control Needs to work like TAB

Status
Not open for further replies.

Nancy2

Programmer
Sep 18, 2001
97
US
Selecting Contents of Text/Combo box on Click
--------------------------------------------------------------------------------
Hello -

I need to ensure text gets selected when a user clicks in the text or combo box.

Using the Got Focus event I've tried:

HeadFootTrim.SelStart = 0
HeadFootTrim.SelLength = Len(HeadFootTrim.Text)

But, the click event seems to occur after got focus AND my code does not run on the Click event at all.

Help -- getting desperate!

Thank you
 
Thank you -- tried it again on click of the combo box and it did not work -- but since it works for you I tried it on a regular text box AND -- it did!

So, any idea why the click event behaves differently on a combo box than a text box? Any ideas how to address this?

Nancy
 
Did some more playing -- I cannot get the click event to occur with a combo box - I did however put code under the got focus event of the box

cboHeadFootTrim.dropdown

This might have to do - it does select it. But, I would prefer not to have to drop it down 1) confusing to user and 2) coding ease - different code for combo vs text box

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top