I have a number of textbox controls which have the KeyPress event coded to:
If AsciiKey = 13 then <control>.setfocus
from a combo box if tab is pressed things work fine. If however, the enter key is pressed on the Combobox the focus moves to the correct control but seems to have an AsciiKey of 13 this immediately passes the focus to the next control. If I remove the KeyPress code for the textbox the focus remains in the right control, but I cant then use the enter key and have to tab.
Any ideas how i can keep the enter key option and get the focus to stay in the first textbox.
If AsciiKey = 13 then <control>.setfocus
from a combo box if tab is pressed things work fine. If however, the enter key is pressed on the Combobox the focus moves to the correct control but seems to have an AsciiKey of 13 this immediately passes the focus to the next control. If I remove the KeyPress code for the textbox the focus remains in the right control, but I cant then use the enter key and have to tab.
Any ideas how i can keep the enter key option and get the focus to stay in the first textbox.