Prevent User from writing in textbox

How can I prevent a user from writing in a textbox.
LVL 8
hello_everybodyAsked:
Who is Participating?
 
Michael VasilevskySolutions ArchitectCommented:
Me.textbox.locked = true
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Set the Locked Property of the text box to Yes

And/Or the Enabled Property to No

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
see attached image
TextBoxLockedEnabled.gif
0
 
hnasrCommented:
Private Sub Text15_Change()
    Screen.ActiveControl.Undo
End Sub
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
hnasr - that's cute, but why not just set Locked to Yes ?

mx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.