Auto tab in masked edit control

F

ffa

Hi All

Is there a way to get a masked edit control to pass control to the next
control in the tab order when data is complete (as specified by the mask).
Put another way, if I have a masked edit control for a phone number (with a
mask requiring 10 digits) and those digits have been entered, I would like
the next control in the tab order to get focus. It used to be called
AutoTab.

Thanks...

Harry
 
P

Phillip Taylor

Hi All

Is there a way to get a masked edit control to pass control to the next
control in the tab order when data is complete (as specified by the mask).
Put another way, if I have a masked edit control for a phone number (with a
mask requiring 10 digits) and those digits have been entered, I would like
the next control in the tab order to get focus. It used to be called
AutoTab.

Thanks...

Harry

under the text_changed event of the mask control (double click on the
control it to create the event placeholder)

add code like this:

If (txtMaskControl.Text.Length = 10) then
AnotherControl.Focus()
End if

------
replace txtMaskControl with the name of your mask control and replace
AnotherControl with the name of the object where you want the focus to
go.

Hope this helps,

Phillip Taylor
 
F

ffa

Phillip Taylor said:
under the text_changed event of the mask control (double click on the
control it to create the event placeholder)

add code like this:

If (txtMaskControl.Text.Length = 10) then
AnotherControl.Focus()
End if

------
replace txtMaskControl with the name of your mask control and replace
AnotherControl with the name of the object where you want the focus to
go.

Hope this helps,

Phillip Taylor
Thanks Phillip. I was hoping there was an inbuilt method, but your
suggestion will do fine.
 

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

Top