Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Catch users CTRL+V in a Datasheet form

Posted on 2007-11-22
2
271 Views
Last Modified: 2013-11-28
Hi,
I want to avoid my users to paste rows into a datasheet view form.
How can I do this?
Now the sometimes mess with clicking the row/columnheader block at the very left top area of the datasheet and hit CTRL-V.
Chris
0
Comment
Question by:chriswies
2 Comments
 
LVL 14

Expert Comment

by:bluelizard
ID: 20334571
try this:

1) create a new macro
2) view > macro names (shows 1 more column "Macro Name")
3) in macro name, enter ^V
4) in Action, fill in anything irrelevant, e.g., Beep
5) save the macro under the name "AutoKeys"


--bluelizard

0
 
LVL 27

Accepted Solution

by:
MikeToole earned 500 total points
ID: 20334730
This is the nuclear option, it disables ctl+v for you form entirely:

1) In your form's Event properties, set KeyPreview to Yes (it's the last in the list)
2) Enter the following code for the KeyDown event of your form:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If ((Shift And acCtrlMask) = acCtrlMask) And (KeyCode = vbKeyV) Then
        KeyCode = 0
    End If
End Sub
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question