By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 2,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

How to Activate Input Mask When Tabbing into Control

P: 14
First thing, because of you all and this web site, I am building a first class time saving database for my fellow workers to use.

My really dumb questions is this.

I have a control in a subform that is in the second position in terms of all the controls in the form. When entering the subform via a toggle button, the focus is set on the first control which is locomotiveID. (By the way, the subform is a datasheet type of subform)

The number 2 control is called TimeObserved and I have included an input mask of short time in the data portion of the property box for this control. I want the input to be in military time. If I tab from the LocomotiveID control to the TimeObserved control, the input cursor is basically a text entry type of cursor. If I click in the TimeObserved control when I leave the LocomotiveID control, then the input mask setup _ _:_ _ is visible and the cursor is set to take the proper input.

I really need to have the input mask setup with the cursor in the proper position set up when I tab from the first control to the second one, but everything I've tried will not work. I'm tried to setfocus in several different ways using the GetFocus event and the same thing with the LostFocus event associated with LocomotiveId Control. Nothing will work short of just clicking in the control's text box. I'm sure the solution is very simple, but I can't figure it out.

Can anyone lead me to the Promise Land on this one? If I can whip this problem, then I'm going to start beta testing the database, so...HELP! *LOL*

Thanks all!

Rick Flink = The Grizz
Feb 15 '07 #1
Share this Question
Share on Google+
5 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi Rick,

I have not used input masks very much as I do not really like them. I have tested this and you are right it will not appear when you tab into the control. I have no idea if there is a fix for it.

Mary
Feb 15 '07 #2

P: 14
Thanks Mary,

As I said this was a really dumb question because all of sudden, after I sent this request for help, it started to work properly. Don't ask me why???? Magic or maybe I have the gifted hand with weird issues. *LOL*.

Anyway, I appreciate the fact you tried to help me out with this one. Life is good now, and I can get to doing my Randy test on it....kind of like a Bubba test, but specific to my work group. If Randy can make it work, anyone can make it work.

Thanks again and have a fantastic rest of the day!

Rick
Feb 15 '07 #3

ADezii
Expert 5K+
P: 8,610
First thing, because of you all and this web site, I am building a first class time saving database for my fellow workers to use.

My really dumb questions is this.

I have a control in a subform that is in the second position in terms of all the controls in the form. When entering the subform via a toggle button, the focus is set on the first control which is locomotiveID. (By the way, the subform is a datasheet type of subform)

The number 2 control is called TimeObserved and I have included an input mask of short time in the data portion of the property box for this control. I want the input to be in military time. If I tab from the LocomotiveID control to the TimeObserved control, the input cursor is basically a text entry type of cursor. If I click in the TimeObserved control when I leave the LocomotiveID control, then the input mask setup _ _:_ _ is visible and the cursor is set to take the proper input.

I really need to have the input mask setup with the cursor in the proper position set up when I tab from the first control to the second one, but everything I've tried will not work. I'm tried to setfocus in several different ways using the GetFocus event and the same thing with the LostFocus event associated with LocomotiveId Control. Nothing will work short of just clicking in the control's text box. I'm sure the solution is very simple, but I can't figure it out.

Can anyone lead me to the Promise Land on this one? If I can whip this problem, then I'm going to start beta testing the database, so...HELP! *LOL*

Thanks all!

Rick Flink = The Grizz
To have the Input Mask automatically set up, and the Cursor in the proper position, in the GotFocus Event of the [TimeObserved] Field place the following single line of code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub TimeObserved_GotFocus()
  2.   SendKeys "{F2}"
  3. End Sub
Feb 16 '07 #4

P: 14
ADezii,

You are a genius! Now things are working perfectly! Thanks so much for the help on this....Now that I've used your suggestion, I need to do my homework, and figure out what it means for future similar situations.

Thanks again!

Rick
Feb 16 '07 #5

ADezii
Expert 5K+
P: 8,610
ADezii,

You are a genius! Now things are working perfectly! Thanks so much for the help on this....Now that I've used your suggestion, I need to do my homework, and figure out what it means for future similar situations.

Thanks again!

Rick
We're always glad to help at thescripts.
Feb 16 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.