Auto tab in masked edit control

  • Thread starter Thread starter ffa
  • Start date Start date
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
 
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
 
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.
 
Back
Top