Are you saying that you have 9 fields in a single row in your table, and you
want the score stored as a 10th field in that same row?
If you don't mind me saying so, your database design is flawed. Rather than
have it as 9 fields in a single row, the score for each hole should be a
separate row in a second table, linked to the first one. You'd score details
about when the game was played, whose score it is and so on in the first
table, and the second table would contain the primary key for the first
table, the hole number and the score for that hole.
Secondly, you should never store calculated fields. Rather, you should
create a query that calculates the total and use the query wherever you
would otherwise have used the table. With an arrangement like I described
above, you'd need a Totals query (View | Total when the query is in Design
view)
If you don't change your design, you should still be using a query, rather
than storing the total. In that case, though, your calculated field would
have to be something like Front9: Nz([Hole1], 0) + Nz([Hole2], 0) + ... +
Nz([Hole9], 0)
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Russ said:
I have a database of golf socres.
field 1 is hole1, field 2 is hole2 etc.
the 10th field is total. how do i add fields 1 through 9 to calculate the
total score for a side?