Time

nvus

Registered User.
Local time
Today, 12:33
Joined
May 11, 2007
Messages
14
OK....so yes...I am a dummy....and need help to cure this headache.

I have a user that MUST insert time.....in Minutes and Seconds only. I set the field to short time. However, whenever the user inputs anything over 24 (minutes) a message appears "The value entered for this field isn't valid"...etc. I know it's because it's trying to store the hour & minutes rather than minutes and seconds so I tried to format the field with nn:ss but still no luck.

I know code is available for the purpose of datediff etc., but what I need is a little different.

First, the user needs to feel warm and fuzzy that what she's entering is correct and second, daily the time is entered and monthly the daily times are totaled and averaged.

I could sure use some suggestions here, if anyone has any.

Thanks in advance.
 
The only thought I could come up with is to let her enter it in Text and you do all the work in code. You could inputformat it as 00:00 so it looks good to her.

Brian
 
I would have them enter minutes into a minutes field (Integer) and second into a seconds field (Integer) and calculate the 'time' field whenever I need it.

Have a look at the example db.
 

Attachments

I agree with Craig but thought you probably wouldn't accept 2 fields, howver the advantage is that you can check for valid values easier.

Brian
 
The others have given you practical suggestions. I'll add a theoretical component. Search this forum for "Time" and "Date" issues, in particular noting posts talking about the fact that date/time fields in Access are a CAST (a.k.a. TYPECAST) of a DOUBLE data element. When you declare a date/time field, you are asking for trouble because of the gyrations Access must perform to accomplish the TYPECAST. Seamless it ain't.
 

Users who are viewing this thread

Back
Top Bottom