The first thing I would do is to set up a table to store the country codes and names. So lets say you set up a table called Country with fields for Country and Code.
The next thing you need is a value list. This will be a list based on the Country::Code field with the second field being the Country::Country field. You may be wise to select the option to show only the second field (the country name).
Now you can attach that value list to the field in question.
If you set it up to display as a pop-up menu, the user will see the country names to choose from. Their selection will enter the country code in the field and the selected country name will remain displayed.
See how you go with that.
Once again, Thanks David!
I'll give this a shot and let you know my resluts! A life saver you are!
Okay, so we have the table setup with both fields defined. I'm unsure as to the steps involved in attaching the value lists. Also, which field is in question? I'm sorry, I know we're newb....
How do we auto-populate the country-code field based on the country manually selected by the user from a drop-down list?
Any help is much appreciated! Thanks!
First, set up the value list. Create a new value list that uses values from a field. For the first field, choose the Country table and the country code field. For the second value choose the country name. Then select the option to "show values only from the second field".
Now find the field where you want the user to select a country (code). In layout mode, double-click the field to enter the Field/Control Setup dialog. Display as a pop-up menu and display values from the value list you just created.
Back in Browse mode, the user will be able to select a country by name. The selected country will remain being displayed. But the data actually in the field is the country code.
See how that works for you.