Connecting Tech Pros Worldwide Help | Site Map

Strange Time-Formating Problem

jv
Guest
 
Posts: n/a
#1: Nov 13 '05
I have a timesheet data entry form with TimeIn and TimeOut textbox
controls. I want the users to only view/enter/update the time in
military-time format. The format of both controls are set to Short
Time(hh:nn). The input mask for both are set 99:00;0;_

This works fine most of the time. The exception is when I click on a
control that has a certain values (i.e. 12:02, 12:06, 12:14, 12:22,
12:23 ... 17:17). When I click on a control with the time 17:17, the
control shows 05:17:00 PM (instead of 17:17). When I click on a
control that has 17:16, it shows 17:16.

For some reason, the format of the short time controls got changed to
long time when it hold certain values upon clicking. When I tab into
the controls, they are OK. Please help!

Thanks.

Julie

jv
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Strange Time-Formating Problem


I am using Access 2002 ADP with SQL 2000. The data type of the TimeIn
and TimeOut fields are smalldatetime. This error only occurs on bound
controls.

I have not figure out a solution to this problem yet. If you have any
ideas or suggestions, please let me know. Thanks.

Julie Vazquez

Steve Jorgensen
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Strange Time-Formating Problem


On 29 Sep 2005 09:46:24 -0700, "jv" <julie_vazquez@hotmail.com> wrote:
[color=blue]
>I have a timesheet data entry form with TimeIn and TimeOut textbox
>controls. I want the users to only view/enter/update the time in
>military-time format. The format of both controls are set to Short
>Time(hh:nn). The input mask for both are set 99:00;0;_
>
>This works fine most of the time. The exception is when I click on a
>control that has a certain values (i.e. 12:02, 12:06, 12:14, 12:22,
>12:23 ... 17:17). When I click on a control with the time 17:17, the
>control shows 05:17:00 PM (instead of 17:17). When I click on a
>control that has 17:16, it shows 17:16.
>
>For some reason, the format of the short time controls got changed to
>long time when it hold certain values upon clicking. When I tab into
>the controls, they are OK. Please help!
>
>Thanks.
>
>Julie[/color]

One problem is that you're using input masks, and input masks are one of the
most seriously damaged devices you can ever use in an Access application.
Find a way to do what you want without them, and your life will be better.

It looks to me like you can just use the format without the input mask in your
case, and everything will work the way you want it to. I tried a test, and I
can tab or click into the field, and it leaves the format as hh:nn.
jv
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Strange Time-Formating Problem


Hi Steve,

Thank you for your suggestion. I've tried removing the input mask and
the time format still change to long time for 12:02.

This problem only occur on a bound control and only for certain time
values (i.e. 12:02, 12:06, 12:14, 12:22, 12:23 ... 17:17).

I'm still struggling with this issue. Please let me know if you have
any other suggestions.

Thanks

Julie Vazquez

Closed Thread