Connecting Tech Pros Worldwide Help | Site Map

TIME

BRIAN LEE via AccessMonster.com
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello

New to Access. I want a database to store information on athletes, including
name, school, ht, wt, body fat, vertical jump ht in inches (eg 24 3/8 in),
running times in seconds for dash(eg 21.2 sec) and distance (eg 8 min 45 sec),
etc. At some point, I may want to do some math with these numbers (averages,
etc). I've made 2 tables and am working on a form. Looking at previous
posts, I thougth I found a way to do this:

=[Run]\60 & Format([Run] Mod 60,";00")

....which I put in "Validation Rule" section of table design. (I'm not sure
if that was the right place.) When I go to enter data into table, I get an
error message that says rule prohibits data entry. What am I doing wrong?
Also, how to create a form for easy data entry?

Thanks very much in advance for any help.

Brian

--
Message posted via http://www.accessmonster.com
Rick Brandt
Guest
 
Posts: n/a
#2: Nov 13 '05

re: TIME


BRIAN LEE via AccessMonster.com wrote:[color=blue]
> Hello
>
> New to Access. I want a database to store information on athletes,
> including name, school, ht, wt, body fat, vertical jump ht in inches
> (eg 24 3/8 in), running times in seconds for dash(eg 21.2 sec) and
> distance (eg 8 min 45 sec), etc. At some point, I may want to do
> some math with these numbers (averages, etc). I've made 2 tables and
> am working on a form. Looking at previous posts, I thougth I found a
> way to do this:
>
> =[Run]\60 & Format([Run] Mod 60,";00")
>
> ...which I put in "Validation Rule" section of table design. (I'm
> not sure if that was the right place.) When I go to enter data into
> table, I get an error message that says rule prohibits data entry.
> What am I doing wrong? Also, how to create a form for easy data entry?[/color]

You're misunderstanding the pupose of that expression. When storing
"durations" one should use a number field to store the smallest increment of
interest. The reason is that Access DateTimes are only good for
points-in-time, not amounts-of-time.

If one then wants to *display* their duration data in the format of Hours,
minutes, seconds, etc., then that is when an expression like that would be
used on a form or report. You do not use it as a validation rule or format
against your actual data.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Bas Cost Budde
Guest
 
Posts: n/a
#3: Nov 13 '05

re: TIME


Validation rule meaning: you may enter a record only if it satisfies
this expression (i.e. it evaluates True)
[color=blue][color=green]
>>...which I put in "Validation Rule" section of table design. (I'm
>>not sure if that was the right place.)[/color][/color]
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Closed Thread