Well firstly, there are two ways to handle this situation. You could create
a handler for the first text box and then add more handles statements for
all the others you want this sub to handle ( 1 sub, handles all your txt
boxes. ), or you can set the form to Preview in the properties, and check
the keypress event for the form, this way you will trap all kepress events
and the form previews them before passing them on the handler for the
control that called them.
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
Time flies when you don't know what you're doing
"Ricky W. Hunt" <(E-Mail Removed)> wrote in message
news

VNGc.22299$JR4.2660@attbi_s54...
> Is there is a way to "change" what character the user typed? For instance,
> is there anything I can put in a Keypress handler that if the user pressed
> the <Enter> key it make it appear to the program that <Tab> was pressed?
I'm
> going through some tutorials that has a number validation routine (to
ensure
> only numbers were pressed, etc.) and it has a check to see if the <Enter>
> key was pressed, and if so to set the focus to the next text box. Since
> there's a bunch of these text boxes this code has to be copied into then
> Keypress handler for each one. A subroutine won't work because the box you
> want to transfer focus on depends on which box you are currently in. I
> thought if I could make it appear to the program as though the user had
> pressed Tab when they pressed Enter the cursor would jump to the correct
box
> (as set up by Tab order) and therefore I'd have a "universal" subroutine
> that could be used for all the boxes.
>
> --
> Thanks,
> Ricky W. Hunt
> freendeed
>
>