>>>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