Moutaz Fino
10-20-2005, 12:04 AM
Hi ;
I try to use arrow key to navigate throw form record KeyDown to move down Keyup Moving up ..etc
Actually I use the following code and still has some conflict :
Private Sub Premium_90R_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo Err_Form_KeyDown
' MsgBox (KeyCode)
Select Case KeyCode
Case 40
DoCmd.GoToRecord , , acNext
KeyCode = 0
Case 38
DoCmd.GoToRecord , , acPrevious
KeyCode = 0
Case vbKeyReturn
DoCmd.GoToRecord , , acNext
KeyCode = 0
Case Else
End Select
'Exit Sub
Err_Form_KeyDown:
Select Case KeyCode
Case vbKeyDown
MsgBox "There are no more records to display", _
vbExclamation + vbOKOnly, "Warning ..."
Case vbKeyUp
MsgBox "You are already at the First Record", _
vbExclamation + vbOKOnly, "Warning ..."
Case vbKeyReturn
MsgBox "There are no more records to display", _
vbExclamation + vbOKOnly, "Warning ..."
Case Else
End Select
End Sub
If I update the field the code will be run and preview the error massage at same time
If I didn?t make any change in the field I?ll get error massage then it will move to next field . (Default movement)
:banghead:
Thank you
I try to use arrow key to navigate throw form record KeyDown to move down Keyup Moving up ..etc
Actually I use the following code and still has some conflict :
Private Sub Premium_90R_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo Err_Form_KeyDown
' MsgBox (KeyCode)
Select Case KeyCode
Case 40
DoCmd.GoToRecord , , acNext
KeyCode = 0
Case 38
DoCmd.GoToRecord , , acPrevious
KeyCode = 0
Case vbKeyReturn
DoCmd.GoToRecord , , acNext
KeyCode = 0
Case Else
End Select
'Exit Sub
Err_Form_KeyDown:
Select Case KeyCode
Case vbKeyDown
MsgBox "There are no more records to display", _
vbExclamation + vbOKOnly, "Warning ..."
Case vbKeyUp
MsgBox "You are already at the First Record", _
vbExclamation + vbOKOnly, "Warning ..."
Case vbKeyReturn
MsgBox "There are no more records to display", _
vbExclamation + vbOKOnly, "Warning ..."
Case Else
End Select
End Sub
If I update the field the code will be run and preview the error massage at same time
If I didn?t make any change in the field I?ll get error massage then it will move to next field . (Default movement)
:banghead:
Thank you