Solved

Catch users CTRL+V in a Datasheet form

Posted on 2007-11-22
2
289 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
[X]
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
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

636 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