Lock textbox from data entry

I have a access form with a textbox placed on it for a date field.  On dbl click I have code that fills in this textbox with the proper date.  All is well!!  My problem is that some users attempt to keyin the information without dbl clicking the textbox.  How can I eliminate this from happening.  I must be overlooking something as I assume this should be easy.

Bob StammOperations ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi RobertStamm,
Me.myTextBox.Enabled = False
Dave :-)
Hang on.. This wont work.. On the double click event of the textbox you are firing this?
Bob StammOperations ManagerAuthor Commented:
Yes.  If I enable = false, I cant double click.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Leigh PurvisDatabase DeveloperCommented:
Not that Dave isn't right.. :-)

But you might have an easier life with
Me.myTextBox.Locaked = False

With Enabled - if you're setting it to False you'll have to setfocus to another control first (or it'll fail naturally - a disabled control can't have the focus).
Also - if you're wanting to double click it - it being disabled that event won't then fire. :-S

But it depends on the result you're after.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Leigh PurvisDatabase DeveloperCommented:
lol oh curse you all for typing while I was lol

Bob StammOperations ManagerAuthor Commented:
Locking the textbox was the solution for me!  
Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

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.