D
Dennis
Hi,
I'm on Access via Xp Office Pro running XP Pro with SP3.
Quick question:
What is the KeyCode for the Escape key in the KeyDown or KeyPress events?
Also, is there a list of all KeyCodes somewhere?
Detail behind the question:
I have created a Calendar control that is working fine. Here is the code I
used:
Private Sub cboWorkDate_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me.ocxCalWorkDt.Visible = True ' Make the calendar
visible
Me.ocxCalWorkDt.SetFocus ' Set focus on the
calendar
If IsNull(cboWorkDate) Then
Me.ocxCalWorkDt.Value = Date ' Set Calendar Start
Date to today
Else
Me.ocxCalWorkDt.Value = Me.cboWorkDate ' Set Calendar Start
Date to Work Date
End If
End Sub
Private Sub ocxCalWorkDt_Click()
Me.cboWorkDate.Value = Me.ocxCalWorkDt.Value ' Get the date the user
choose in the calendar
Me.cboWorkDate.SetFocus ' Set focus back on the
work date field
Me.ocxCalWorkDt.Visible = False ' Make the calendar
disappear
End Sub
When I click on the Work Date combo box, the calendar appears. When I click
on a date, the date is returned and the calendar disappears.
However, when I hit the Escape key the calendar does not appear. So I'm
guessing that I will have to code that part.
I have created a subroutine called:
Private Sub ocxCalWorkDt_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
If keyCode = ???? Then
me.ocxCalWorkDate.Visible = False
me.cobWorkDate.SetFocus
end if
End Sub
I'm looking for a list off all keycodes for KeyDown event.
I'm on Access via Xp Office Pro running XP Pro with SP3.
Quick question:
What is the KeyCode for the Escape key in the KeyDown or KeyPress events?
Also, is there a list of all KeyCodes somewhere?
Detail behind the question:
I have created a Calendar control that is working fine. Here is the code I
used:
Private Sub cboWorkDate_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me.ocxCalWorkDt.Visible = True ' Make the calendar
visible
Me.ocxCalWorkDt.SetFocus ' Set focus on the
calendar
If IsNull(cboWorkDate) Then
Me.ocxCalWorkDt.Value = Date ' Set Calendar Start
Date to today
Else
Me.ocxCalWorkDt.Value = Me.cboWorkDate ' Set Calendar Start
Date to Work Date
End If
End Sub
Private Sub ocxCalWorkDt_Click()
Me.cboWorkDate.Value = Me.ocxCalWorkDt.Value ' Get the date the user
choose in the calendar
Me.cboWorkDate.SetFocus ' Set focus back on the
work date field
Me.ocxCalWorkDt.Visible = False ' Make the calendar
disappear
End Sub
When I click on the Work Date combo box, the calendar appears. When I click
on a date, the date is returned and the calendar disappears.
However, when I hit the Escape key the calendar does not appear. So I'm
guessing that I will have to code that part.
I have created a subroutine called:
Private Sub ocxCalWorkDt_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
If keyCode = ???? Then
me.ocxCalWorkDate.Visible = False
me.cobWorkDate.SetFocus
end if
End Sub
I'm looking for a list off all keycodes for KeyDown event.