Populating fields on a form from lookup tables

S

soldier_boy

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?
 
A

Allen Browne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top