• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1217
  • Last Modified:

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.

Ideas?
Thanks,
Bob
0
RobertStamm
Asked:
RobertStamm
  • 2
  • 2
  • 2
1 Solution
 
flavoCommented:
Hi RobertStamm,
Me.myTextBox.Enabled = False
Dave :-)
0
 
flavoCommented:
Hang on.. This wont work.. On the double click event of the textbox you are firing this?
Dave
0
 
RobertStammAuthor Commented:
Yes.  If I enable = false, I cant double click.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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.
0
 
Leigh PurvisDatabase DeveloperCommented:
lol oh curse you all for typing while I was lol

0
 
RobertStammAuthor Commented:
Locking the textbox was the solution for me!  
Thanks for the help.
Bob
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now