
Use enter key to move to next field
If you don't want to use Sendkeys set the active-control enabled = false
and in the next line enabled = true.
So the focus went to next control with the tabstop = true.
example:
two Textfields on a form
Text1.Tabindex=1 and text2.tabindex=2
if the focus is on text1 and you put this code into the keydown or keypress
event of the textfield you'll get the focus on text2:
public sub text1_keydown(keyascii as integer (???))
if keyascii=vbkeyreturn then
me.text1.enabled=false
me.text1.enabled=true
end if
end sub
best regards
Alex
--
Dim Life as Boolean
Life = True
http://www.crazyALEX.notrix.de
ich wnsche noch nen bug-freien Tag!
i'll wish you a bug-free day!
Quote:
>Private Sub Text1_KeyPress(KeyAscii As Integer)
> If KeyAscii = 13 Then
> KeyAscii = 0
> Text2.setfocus
> End If
>End Sub
>I never recomend sendkeys they are flakey to say the least
> C.David Johnson
> Missionary searching for a Field
> http://www.siteblock.net
> Do not reply to the posted address it belongs to
> the Federal Trade Commissions Spam enforcement Division
> Visit my site to get the real e-mail.