SetFieldID to Suit ValueList
My database has numerous occurances where the Child table holds the foreign key of the Parent table where an item in the Parent table is further defined by an item in the child table. Example: The EventTask table is joined to it's child table called Event. The join is as follows: EventTask::__pkEventTaskID -->Event::_fkEventTaskID.
The parent table also contains a field called TaskType where various tasks are listed in text form. In the Parent table (Event), I use a valuelist that the field _fkEventTaskID uses in a popup control. The valuelist uses value __pkEventTask from the first field and EventTaskType from the second field. I only display values from the second field.
In one instance I need to set the _fkEventTask (in the child table) to match an item in the value list. I wish to use the SetField method. How do I script this to select a valuelist item? Or should I set the field to the number (as per the __pkEventTaskID) that corresponds to the selection I wish to get?