Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inputmask for hour
Message
 
To
14/01/2005 19:57:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
00977403
Message ID:
00977461
Views:
34
>>>How do I specify an InputMask for an hour? I want to force the user to input data in the format 00:00, but when I use that InputMask, the TextBox never gets focus. As soon as I click on it, the focus goes to the next object in the TabOrder.
>>>
>>>TIA,
>>>
>>>Hilmar.
>>
>>TextBox.InputMask = "##:##"
>>
>>Your controlsource for this should be character, and you'll need to validate the ranges in code.
>
>Thanks, that was it. Strangely, I had temporarily forgotten some of the most basic details about InputMasks, and tried to use "0" instead of "#" for the digits.

Hilmar,

Back in the late eighties, I decided that since there were two ways to use an input mask for numeric input (the other is "99:99"), I'd differentiate how I'd use them.

If the control source was, indeed, numeric, then I'd use the "#" character. If, however, the control source was actually text, such as a zip code or, in your case, a time, then I'd use "9".

This gives me the advantage of knowing, simply by looking at the mask, what data type the control source is.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform