time format of txt box (1 Viewer)

Andy74

Registered User.
Local time
Today, 13:17
Joined
May 17, 2014
Messages
117
Hello everybody,

I have a small issue, but cannot solve it. I have a form with a textbox bound to a time(7) on a SQL server linked table.
Even if I put the format as "Short time 24h" or "hh:mm" it will always come out with seconds, nanoseconds, etc as soon as you change record. Any clue on this? I would like to avoid using the "current" event to keep the "hh:mm" at any record change.
Thanx
 

Keith Tedbury

Registered User.
Local time
Today, 12:17
Joined
Mar 18, 2013
Messages
26
I have had a similar problem before on reports and ended up having to format the field in the reports record source so was feed to the textbox in the correct format.
 

Andy74

Registered User.
Local time
Today, 13:17
Joined
May 17, 2014
Messages
117
thanks for the quick reply Keith. Anyway the record source is a SQL table and the field is a time(7) type. When I link this in the Access 2010 frontend it converts it to a TEXT field type and I think that is creating the problem.
 

Keith Tedbury

Registered User.
Local time
Today, 12:17
Joined
Mar 18, 2013
Messages
26
I don't think Access recognizes nanoseconds, which would cause a problem because it would not recognize the text as a time format which would be why "hh:mm" doesn't work.

On this form are you just displaying the time or do you need to be able to enter and edit it as well?
 

Andy74

Registered User.
Local time
Today, 13:17
Joined
May 17, 2014
Messages
117
well, in fact it's a text box for entering and editing data. Anyway I have solved the issue by keeping it as a pure text field and forgetting the "hh:mm" format. But this approach will not be good if I really need to work on the data (like using it in a calculated field or anything like that). Thanks for your help.
 

Users who are viewing this thread

Top Bottom