Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access-calculated field

Status
Not open for further replies.

PeteMc

Instructor
Jan 30, 2003
2
GB
I have [Goals For]and [Goals against] fields for each game to be played, how can I calculate the [Points] field so that 3 is awarded for a win, 1 for a draw and 0 for a loss
PeteMc
 
Don't

or should I say DON'T

Calculated fields are totally against the whole principle of Relational Database design ( Normalisation Rules, Codd, etc.. )


On a Form or report you can then display the points value by using something like a nested IF statement in the ControlSource

txtPoints = If(GoalsFor>GoalsAgainst,3,If(GoalsAgainst>GoalsFor,0,If(GoalsFor=0,1,2)))



By the way - see FAQ FAQ700-2190 about why to avoid EVER putting space characters in object names.



'ope-that-'elps.







G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
Thanks LittleSmudge, big help. Take your point about Dr Codd.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top