>The Tab key does not trigger the KeyPress event. Is there a simple way of of finding out when the user presses the Tab (or Shift Tab) key, and send it to the KeyPress event of a text or combo box?
I don't know of a simple way to find out if a user pressed the Tab key (it's strange that key press event doesn't catch this in VB6), but you could check for a condition in the lost focus event and keep the focus on the control in question if that's what you want to do.
Private Sub txtImportFile_LostFocus()
If Me.txtImportFile.Text <> "test" Then
Me.txtImportFile.SetFocus
End If
End Sub
Al Williams
Anola MB, CANADA