Jeff Swanson
|
| Posted: 08/06/2002, 1:58 PM |
|
I want a field to be filled in automatically based on another field. What I am getting at is, I have a list of drivers and their racing numbers. When the administrator picks the racer's name, the racing number is filled in automatically. How do I do this. It seems that no matter how I do this, the field fill not fill in.
Thanks
|
|
|
 |
Nicole
|
| Posted: 08/07/2002, 6:39 AM |
|
Jeff,
well, where administrator selects the racer's name and where do you want racing number to be filled? In case you want to fill it automatically after the record form is submitted you can use DLookUP() function in Before Insert/Update event to retrieve the corresponding racing number and fill the field value.
|
|
|
 |
Jeff Swanson
|
| Posted: 08/07/2002, 7:09 AM |
|
Not before submitted, but rather, as the administrator is entering new race statistics. They pick the racer's name and the kart number field is filled in automatically. This helps get the race stats filled in faster. If I could figure out how to do this, I also have other fields I want to fill in automatically. for example, when the admin picks what position the racer finished, the points for that place would also fill in automatacally. All this information is stored in a seperate tables. I hope I explaned this properly.
|
|
|
 |
Nicole
|
| Posted: 08/08/2002, 1:07 AM |
|
Jeff,
I see two ways how to achieve it.
The first one is to use onchange event for racer's name field and reload the window passing the name through url. When the page is loaded second time you should catch the name, look up the rest necessary info and place it into corresponding fields. In order not to lose the record id you should pass primary key value with the racer's name as well.
The second solution could be based on the depending listboxes article (http://www.gotocode.com/art.asp?art_id=45&) where looked up fields are filed without reloading the page.
|
|
|
 |
|