Populating fields on a form from lookup tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database that tracks information on soldiers. One area
tracked is the Army Physical Fitness Test. For instance is a Male sodier is
between the ages of 18-21 and does 60 pushups, he scores so many points. If a
male soldier between the ages of 22-27 does 60 pushups, he scores so many
points. I'm trying to construct a way where if I enter his his sex, age and
number of pushups, it will automatically populate the field for his score.
Am I making any sense?
 
Use the AfterUpdate event procedure of the text box on your form, to
DLookup() the score, and assign the result to the next textbox.

The specifics will depend on how your tables are setup, but if that sounds
like complete gobblegook, see:
Calculated fields
at:
http://allenbrowne.com/casu-14.html
The article explains when to store the calculated result (essentially, if
the score you give for the activity might change later but you want to keep
the old scors anyway), and the second half explains how.

For help with DLookup(), see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
 
Back
Top