Race Results Formatting

G

Guest

Anyon
Seting up db to record race times and results for local swim club. How do I format the time cell? Need it to have minutes, seconds, tenths and thousanths of seconds
 
T

Tim Ferguson

How do I format the time cell? Need it to have minutes, seconds,
tenths and thousanths of seconds

Depends: I'm a bit worried about the word "cell" as database terminology
usually uses words like "record", "field" (or occasionally row and column)
and "textbox".

For the storage, I'd use some kind of numeric value: in your case
presumably a floating point for seconds. A Long Integer holding
milliseconds would be an alternative if you really need spot-on precision.
This assumes you need to do some kind of maths on the values (average,
standard deviation, etc) -- if it's only sorting then a simple text string
would work but would be a bugger to validate. Can be done though.

For the display, you have a number of alternatives. The cheapest would be a
single texbox and requiring the user to convert everything into seconds.
Next up would be separate textboxes for the minutes, seconds and fractions,
and some VBA behind the scenes to convert the values to and fro. Then
again, you could have a set of spinner controls to let the user change the
values. Or a single textbox handling a string like "1:37.009" and parsing
that into and out of the real value. Best of all would be a custom ActiveX
control that does it all for you. Frankly I don't know if one of these
exists, but judging from the number of posts here asking exactly that
question I imaging that there is a huge market for one. If you have the
time and the inclination, VB from version 5 upwards has been able to create
ActiveX components...

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top