Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable the copy paste function

Status
Not open for further replies.

8177

Programmer
Aug 6, 2003
25
GB
Hi Guys


Does anybody know of a way I can stop users from pasting data in to fields (Memo), as they keep pasting carriage returns etc
 
Maybe just use the textbox's BeforeUpdate() event to clean up the string?

e.g.
Private Sub txt_BeforeUpdate()
'use the .Text property, not .Value on this function only
txt.Text = replace(txt.Text, vbcrlf, empty)
End Sub


That's an extremely (over?)simplified example of what you want to do. Anyway, you can't disable paste ***properly*** in Access (though you might be able to disable one or two ways to do a paste operation).
 
The only 2 ways that PSEALE suggests might be to create your own custom menus to use without the cut, copy and paste commands. And disable the shortcut menu on your form. But users could still use the keyboard shortcuts (CTRRL-X, CTRL-C and CTRL-V) to get around this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top