Is their any way to determine if the user pressed the "tab" key or the "enter" key? I'd like to preform different events after determining which keystroke the user performed.
Let's say you have a texbox called Textbox1 and you want to trap when a user Tabs from that textbox, you would do this in the Key Press event or the Key Down event of the textbox. Look in the property sheet of the textbox under the "Event" tab and you will these events I've mentioned.
For the Key Down event, put the following line of code:
Code:
MsgBox "KeyCode: " & KeyCode
Then open your form in design view, put the cursor inside the textbox and tab out.