473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to Activate Input Mask When Tabbing into Control

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
5 3578
MMcCarthy
14,534 Expert Mod 8TB
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
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
8,834 Expert 8TB
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
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
8,834 Expert 8TB
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

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

Similar topics

4
by: David W. Fenton | last post by:
I'm working on a subform where users put in 24-hour time. On their paper forms, they've been accustomed to referring to midnight as 24:00 (instead of as 0:00, which kind of makes sense from a human...
1
by: Miranda Evans | last post by:
In my application, a text box control resides in a form. The text box control is unbound, but--assuming all edits are passed when the user click a command button on the form--the contents of the...
2
by: Paul | last post by:
Hi everyone, here is the problem: I have 2 fields...Province and PostalCode The afterUpdate event of the province has this snippet of code: ... ... If Country = "canada" Then...
7
by: F. Michael Miller | last post by:
I have a db with Access front end, sql back, linked tables. I need to be able to change input masks at the table level in code. Any ideas? Thanks!
3
by: AA Arens | last post by:
When I want the first character of a field to be Uppercased, I need to make an input mask, like >L< followed by ??????? for example. But this mask creates ____ in an unfilled field, which I don't...
2
by: BerkshireGuy | last post by:
Is there a way to display what the expected format is before entering a control. For instance, if I have the input mask of 99/99/0000;0;#, it shows me ##/##/##, but only when I type the first...
9
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox? Or can I use for mask input some other control?
16
by: Filips Benoit | last post by:
Dear all, I have a datefield that sometimes should store hours and minutes too ans use following format and inputmask. dd/mm/yyyy hh\:nn 09/09/0000\ 99:99;0;* Typing date, hour and...
1
by: Doug | last post by:
Hi, I created a short date field. The format is dd/mm/yyyy when displayed. The input mask is set to 99/99/00;0 (default, I didn't type anything). If I edit an existing date, say change...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.