Shaimaa T
08-11-2014, 01:57 AM
Hi all,
I want to handle the event when a user clicks Ctrl+C for a complete record in a datasheet then goes to a new record and presses Ctrl+V.
I have added the following
Private Sub Text40_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 22
MsgBox "Please copy and paste the desired values one at a time."
End Select
End Sub
12090
However, since this is for a complete selected record not for a single textbox , I do not know where to add this event (in the form as a whole it would not work , and for a single control it would work only when selecting that control).
Also, I want to be able to handle the event of right clicking via the mouse and choosing Delete Record , or paste (that is , display a message to the user that he cannot delete a record , and cannot update all records at the same time- this is because the underlying view contains multiple base tables so I wanted to pop up a user-friendly message instead of the database error message).
I want to handle the event when a user clicks Ctrl+C for a complete record in a datasheet then goes to a new record and presses Ctrl+V.
I have added the following
Private Sub Text40_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 22
MsgBox "Please copy and paste the desired values one at a time."
End Select
End Sub
12090
However, since this is for a complete selected record not for a single textbox , I do not know where to add this event (in the form as a whole it would not work , and for a single control it would work only when selecting that control).
Also, I want to be able to handle the event of right clicking via the mouse and choosing Delete Record , or paste (that is , display a message to the user that he cannot delete a record , and cannot update all records at the same time- this is because the underlying view contains multiple base tables so I wanted to pop up a user-friendly message instead of the database error message).