If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Race Results Formatting
Anyone
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 |
#2
|
|||
|
|||
Race Results Formatting
"=?Utf-8?B?VHVnYm9hdA==?=" wrote in
: 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 |
Thread Tools | |
Display Modes | |
|
|