Avoiding Common Names in Foreign Tables

When a gadget is tied to a table column and has a foreign table, you must ensure that the Data Source and Column gadget values are never the same as its Foreign Data Source and Foreign Value Column/Foreign Display Column.

A DbField with the Same Data Source and Foreign Data Source

You can be tempted to set up a combo box this way so that you can select the current row based on values in one of the columns. This step has a more disturbing result.

Data Source and Column are used to specify the data source column to which the gadget is tied. This means that values from this column can be displayed and edited via the gadget. Foreign Data Source and Foreign Value Column/Foreign Display Column specify the foreign table of a gadget.

Take the case of a gadget that is tied to a column displaying values from that column and that also has a combo box. The combo box menu will contain the set of possible values that the column can take, which will be the same set of values. If you then select a new value for a row, you will end up with a column that starts to have repeating values.

To successfully set up a combo box that enables you to select the current row in a form, you must use a parameter. See Parameters.