customizing data entry

Ringers

Registered User.
Local time
Today, 22:07
Joined
Mar 4, 2003
Messages
54
I need to setup a text field for the duration of a phone call. I want to enter '5' and have the text field display 00:05 and '10' 00:10 etc.... at the moment it just displays '5' or '10' what ever you entered. But these could be 5 days or 10 hours, so i need a format.

I have tried playing around with the format and input mask for this field with no luck. So any help with this would be great. :)
 
Ringers,

You could set a variable, or textbox, equal to Now() when they
start. Then you could use the timer event to get the current
time.

TotalMinutes = DateDiff("n", TimeStart, TimeNow)

Hours = Int(TotalMinutes/60)
Minutes = TotalMinutes - (Hours * 60)

Me.Display = Trim(Str(Hours)) & " Hours and " & Trim(Str(Minutes)) & " Minutes"

Just some thoughts.

Wayne
 
Nice idea wayne, but access to the database isn't always at the start of the phone call.
 
Ringers,

I had just re-read your post and realized that I had something
totally different in mind. Phone calls don't vary that much do
they.

You could have two textboxes, clearly marked as hours and
minutes and have them enter into them.

Or you could have just one textbox and let them work only
in total minutes.

Wayne
 
Yep, thats not a bad idea to work only in minutes. But what happens when some body who dosen't know the system tries to use it or tries to retrieve information.

It will just have '5' or '10', i really need some kind of format/structure e.g. 00:00 any ideas on how to approach this would be good.
 
Ringers,

If almost all calls are just some number of minutes, not hours,
and the textbox is clearly labeled "Time in minutes:", you
should be OK.

Anything over x amount of minutes, you can pop up a dialog
box and ask them "Are you serious?".

For summary reports, etc. you can always convert to
days/hours/minutes.

The important thing is consistency.

Wayne
 
What you say is true, but it would look sexier 00:00 instead of 5.
 
Ringers,

It is easy to alter its appearance, but what if they start typing
05:35 (5 minutes and 35 seconds)?

Wayne
 

Users who are viewing this thread

Back
Top Bottom