strMyString = the name of the text box

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

How do I create a string expression based on
whatever textbox currently has the focus?

I.e., strMyString = the name of the text box that currently has the focus

Bill
 
Hi Bill,

Screen.ActiveControl.Name
or
Screen.ActiveControl.Value
or
Screen.ActiveControl.Text
depending what you want to do.
 
I used Tom's expression. And, since it worked perfectly
the first time and subsequently elsewhere, I didn't try the
other two offered by Duane and John.
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top