P
Prakash
I have a "continuous" form for which I've set up a key handler to
prevent the cursor from rolling into the 1st left-most column as
follows:
Private Sub Unit_Id_KeyDown(KeyCode As Integer, Shift As Integer)
' This being the Left-Most column stop cursor from Rolling to the
LAST column
If KeyCode = vbKeyLeft Then
KeyCode = 0
Beep
End If
End Sub
This works fine as long as the user has not clicked within the Unit_Id
field i.e. (it is fully selected in dark color). If however the user
has clicked with the Unit_Id field or pressed F2 to edit it, then also
the left-arrow key is blocked & beeps.
What I'd like is:
a) If in EDIT mode the left arrow should scroll & work within the
field and ...
b) if in selected mode, the left arrow should get trapped & beep. Any
ideas ??
Rgds,
Prakash.
prevent the cursor from rolling into the 1st left-most column as
follows:
Private Sub Unit_Id_KeyDown(KeyCode As Integer, Shift As Integer)
' This being the Left-Most column stop cursor from Rolling to the
LAST column
If KeyCode = vbKeyLeft Then
KeyCode = 0
Beep
End If
End Sub
This works fine as long as the user has not clicked within the Unit_Id
field i.e. (it is fully selected in dark color). If however the user
has clicked with the Unit_Id field or pressed F2 to edit it, then also
the left-arrow key is blocked & beeps.
What I'd like is:
a) If in EDIT mode the left arrow should scroll & work within the
field and ...
b) if in selected mode, the left arrow should get trapped & beep. Any
ideas ??
Rgds,
Prakash.