PC Review


Reply
Thread Tools Rate Thread

How to activate a text box

 
 
NoSpam@aol.com
Guest
Posts: n/a
 
      15th Nov 2007
I have a form that contains a text box and some other controls. After a
user uses one of the other controls, I would like to activate the text box
so that the user can immediately type in it without clicking it first.

Thanks for any help!
 
Reply With Quote
 
 
 
 
Dan R.
Guest
Posts: n/a
 
      15th Nov 2007
It depends on the control. For an option button:

Private Sub OptionButton1_Click()
Me.TextBox1.SetFocus
End Sub

Or for another textbox:

Private Sub TextBox1_Change()
If Len(Me.TextBox1.Text) = 4 Then
Me.TextBox2.SetFocus
End If
End Sub

--
Dan
 
Reply With Quote
 
NoSpam@aol.com
Guest
Posts: n/a
 
      15th Nov 2007
Thanks - that works great!

On Thu, 15 Nov 2007 08:15:21 -0800 (PST), "Dan R." <(E-Mail Removed)>
wrote:

>It depends on the control. For an option button:
>
>Private Sub OptionButton1_Click()
> Me.TextBox1.SetFocus
>End Sub
>
>Or for another textbox:
>
>Private Sub TextBox1_Change()
> If Len(Me.TextBox1.Text) = 4 Then
> Me.TextBox2.SetFocus
> End If
>End Sub


 
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
how do you activate text direction? =?Utf-8?B?YmlnIHJlZA==?= Microsoft Word Document Management 0 9th Jun 2006 06:22 AM
how do you activate text direction? =?Utf-8?B?YmlnIHJlZA==?= Microsoft Word Document Management 0 9th Jun 2006 06:22 AM
how do you activate text direction? =?Utf-8?B?YmlnIHJlZA==?= Microsoft Word Document Management 0 9th Jun 2006 06:22 AM
how to activate text to speech frsm Microsoft Excel Discussion 2 7th Mar 2006 10:25 PM
Activate a text box? MattB Microsoft ASP .NET 2 3rd Jul 2004 12:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:39 PM.