R
Rob Hofkens
Hello everyone
I think this has been asked many times and I already found some code, but
somehow it doesn't work and it doesn't cover everything.
I have a very simple form with 2 textboxes and I only want the users to do
this:
1) Fill in the 2 textboxes.
2) "Save" button to save the record.
3) "Exit" button to exit the form (cancel the add if not saved before)
I found code to disable the PgDn and PgUp keys but it doesn't work somehow :
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 33, 34
'If KeyCode is PAGEUP or PAGEDOWN then nullify them
KeyCode = 0
End Select
End Sub
I think I miss something but don't know what ?
I already spend a lot of time on this fairly simple thing.
Hope someone can help here
Thanx in advance !
Rob.
I think this has been asked many times and I already found some code, but
somehow it doesn't work and it doesn't cover everything.
I have a very simple form with 2 textboxes and I only want the users to do
this:
1) Fill in the 2 textboxes.
2) "Save" button to save the record.
3) "Exit" button to exit the form (cancel the add if not saved before)
I found code to disable the PgDn and PgUp keys but it doesn't work somehow :
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 33, 34
'If KeyCode is PAGEUP or PAGEDOWN then nullify them
KeyCode = 0
End Select
End Sub
I think I miss something but don't know what ?
I already spend a lot of time on this fairly simple thing.
Hope someone can help here
Thanx in advance !
Rob.