Hi,
I am putting together a project for a football cup competion.
In my database I have a table which logs details of the games.
I have (amongst others) the following fields:
Home (Home Team)
Away (Away Team)
HomeScore (Home Goals)
AwayScore (Away Goals)
Winners (Winning Team)
What I want to achieve is that after adding or editing the record, I want the Winners field to be auto populated with the Team (Home or Away field) that has the highest number of goals.
Eg, if the HomeScore field = 3 and the AwayScore field = 1 then the contents of the Home field would be inserted into the Winners field.
Likewise, if the AwayScore field is higher, then the contents of the Away field should be inserted into the Winners field.
I imagine I would use events to achieve this, but I have no idea how - can anyone help.
Thanks in advance.
Alan