Pringle9984 said:
I'm assuming by 'unbound field' you mean a text box on a form that
isn't linked to any control source.
In this case you can set the 'Format' property of the text box to
'Medium Time' and that should do what you want - shouldn't require
any code or anything.
Note that the formatting will be the same as a 'Medium Date' in a
table would be, thus things like:
13.00
1 pm
13pm
13.0
Will work, but some things like:
13
1300
1
Won't work; I don't see any realistic way to catch every possible
input a user could enter because in theory they might right "ONE PM"
- you'd need to consider everything they enter - setting the format
of the text box as Medium Time should be a good starting point
though.
They are entering the Times from an Onscreen Number Pad....Numbers only.
I also have an AM/PM button...
So they would touch
Button 1 and get 1
then Button: 1:
then Button0 1:0
then Button0 1:00
then ButtonAM 1:00 AM thats _AM
They would build the time this way and hit done...
this would then be transfered to the bound field containing the time
with a Medium time Format.
But of course...I'm sure mistakes will be made,,so I want to force the
format,,they are pretty limited to their mistakes.
Thanks
DS