By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,130 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

TIME

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
BRIAN LEE via AccessMonster.com wrote:
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?


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
Nov 13 '05 #2

P: n/a
Validation rule meaning: you may enter a record only if it satisfies
this expression (i.e. it evaluates True)
...which I put in "Validation Rule" section of table design. (I'm
not sure if that was the right place.)

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.