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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.