Link to home
Start Free TrialLog in
Avatar of Pleinpopossum
Pleinpopossum

asked on

Keypressed

I'd like to catch the hit key in a vbform composed by several text boxes, combo boxes wherever the focus is.

For example: there is a text box to show a code and there is a text box to show the name of the product. If want my user to press insert to open a new form for adding a product wherever the focus is set (the T_code or the T_Libelle).

Thanks
ASKER CERTIFIED SOLUTION
Avatar of deighton
deighton
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'need formKeyPreview = true

If KeyCode = 45 Then

 Form2.Show
   
End If


End Sub