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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine which control has got the focus

Status
Not open for further replies.

kermit01de

Technical User
Jan 20, 2002
256
DE
Hi all,
I did not find anything here, neither in my VB Books...

Form1: I would like to get the name of the object that has got the focus actually to update the value.

I have got a value in my "tempval" variable. Depending on the focused object this should be updated

-> focused.text = tempval

Any hint on that?

Thanks!

Mirko


--------------------------------------
>>>>>> Bugs will appear in one part of a working program when another 'unrelated' part is modified <<<<<
 
Try putting a line of code in :

debug.print Form.ActiveControl.Name

and that will show you which control has focus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top