
Having trouble changing the focus...
Even though SetFocus is not what you want, I can't see how it doesn't make
sense: Text1.SetFocus -- Set the focus to Text1.
In the KeyPress event, when you get the KeyAscii of 13, put the line:
SendKeys "{Tab}"
which will simulate the user pressing the <Tab> key, and advance the focus to
the next control in the tabindex.
Lee Weiner
weiner AT fuse DOT net
Quote:
>I am rather new to VB and am having a heck of a time trying to figure out
>how to move the focus to a new frame after I enter text in a text box.
>After I enter text and while using a keypress procedure to check for
>keyascii = 13 and a small routine to validate the entered text, I would
>like the focus to switch to the next tabindex item or frame.
>I am sure this is rather easy to do, but being new to VB the gotfocus and
>setfocus aren't making sense to me.
>Any help would be appreciated.
>Thanks,
>Kevin Gwash