The quickest way to enforce proper entry is to use validations. You can set a field to accept only values that are members of a value list by setting the appropriate option in the Manage Database dialog:
As for the text showing up as white-on-white ... that sounds like a field formatting issue. Check the styling / formatting of the field.
The fact that it's a related field shouldn't have anything to do with it. Is the related table in a separate file (i.e. using a separation model)?
Thanks; I'll keep experimenting. Your help appreciated :-)
And you're sure the validation is set to the correct value list?
It is. But I can still type in that field. I want to prevent that entirely.
Then you need to get away from using a drop-down list. The validation will prevent users from entering non-valid data, but, by necessity, will allow them to type in the field (because they have to be able to do that to use the drop-down). Alternative approaches include:
1) Pop-up menu
2) List view with scripting to insert the correct value
I tend to favor the list view, as it allows you to hide the key field completely from user view, and does not become unwieldy if the list becomes too long.
OK. Thanks; I'll give them a try.
Oh, and a third approach: An OnModify or OnEnter Script Trigger. But that's a bit of a pain to implement, given that the user will have to enter the field in order to select a value.
Based on your setup, the field which carries the value list must be the ID field, not the Name field. Simplest way is probably:
1. Forget about field validation
2. Place the ID field in the portal, configure it with your value list and select entire contents
3. Place the Name field directly over the top of it, configure this to prohibit access in Browse mode, and define it as a button that navigates to the field under it
When a user clicks on the visible Name field the cursor will simply drop into the hidden ID field and the value list will open, then when a selection is made the ID will be placed in the hidden field and the visible field will show the name that was selected from the value list.
Not sure that solves the OP problems.
1) Users can still type in the ID field.
2) Without the validation, users can still enter non-valid data in the key.
3) Still presents the confusion factor to the user, as they see an "invisible" field (if you configure it to have "clear" text - same color as background) with a pull-down.
I've used that sort of setup in the past, and abandoned it because of these issues. But, YMMV. You might have found some way to control it.