Solved Dont allow data to be manually typed

oxicottin

Learning by pecking away....
Local time
Yesterday, 21:39
Joined
Jun 26, 2007
Messages
888
Hello, I have a text box with an on click popup and employees are getting around the popup and manually entering data by tabbing to the textbox and not clicking in it to open the popup. How can I not allow then to manually type the data and force the on click?
 
Does locking the textbox work for you? The on focus event would catch both click and tab.
 
That's brilliant, I never thought of that... Yes that worked perfectly!
 
Yet another possibility, change to the Enter event rather than the Click event.

Frankly, I wouldn't try to use most Access form controls' Click event, generally speaking. Too much futzing about with what can or can't take the focus or receive a click.
 
Ok ran into a pickle.... the on focus works great on opening my picker BUT once my picker moves the data from it back to the form im again able to enter anything and clicking in the textbox wont open the picker back up. The only way I can get the picker to open back up is to click on another text box and click back onto the one im wanting.

Thoughts?
 
Did you try locking the textbox? It would allow focus but prevent editing. As to the clicking, your code in the picker could move focus elsewhere.
 
Yes I did... I attached an example of my two pickers and a few text boxes. Another example is if I chose not to select anything from either picker then it would allow manual data entry after the picker closed.
 

Attachments

On a side note, do you know of any examples of a time picker that is the easiest to use other than sliders.
 
Does this as the last line in your get value function help?

Me.txtFirstTest.SetFocus

Are you saying you want the textbox unlocked if the user doesn't select from the picker? If so you could unlock it instead of setting its value.
 
I haven't used a time picker. I have apps where the user enters times, but they like "heads down" data entry so I just use an input mask where they enter a 4 digit number. They would shoot me if I popped up a picker like that. :p
 
Im just saying I don't want the user manually entering data, at least for the length picker I could however just ditch that time one and let them enter it I hate it!
 
Ok ran into a pickle.... the on focus works great on opening my picker BUT once my picker moves the data from it back to the form im again able to enter anything and clicking in the textbox wont open the picker back up. The only way I can get the picker to open back up is to click on another text box and click back onto the one im wanting.

Thoughts?
good day

>supply your code to click Event "txtSampleTime"

Dim returnedValue As Variant

returnedValue = getValueFromPopUp("frm_TimePicker", "txtTime")
If returnedValue & "" <> "" Then Me.txtSampleTime = returnedValue

>result is all way pop-up

your TimeSlider is nice
>i'll make use of it
 

Attachments

  • TimeSlider.png
    TimeSlider.png
    66.9 KB · Views: 135
Last edited:
I'm not sure what you meant by this then:

Another example is if I chose not to select anything from either picker then it would allow manual data entry after the picker closed.
 
I got it pbaldy it went to the text box but I was assuming it would allow data entry but it doesn't. I also ditched the time picker and set the format to h:nn and input mask to 00:00 .
 
Glad you got it sorted out!
 

Users who are viewing this thread

Back
Top Bottom