Function keys assign

  • Thread starter Thread starter Marcelino Benitez via AccessMonster.com
  • Start date Start date
M

Marcelino Benitez via AccessMonster.com

hi guys, How I can assign function keys . Like I want F6 to give me the
today's date in a field.
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF6 Then
Me.Text1.VALUE = DATE
End If
End Sub

This will do this for the specific field when it has focus

to do this at a form level you need to set the "Key Preview" property for
the form to yes and set the event handler for the form for KeyDown event
 
Back
Top