Tracing the Origin of Dynaset Fields

A dynaset-type Recordset object can include records from more than one source table. In addition, within a single record, fields from different tables can be joined to new records. Sometimes it’s useful to know the table from which a field originated. The SourceTable property of a Field object returns the name of the base table from which the field’s current data was retrieved.

Within a query, a field can be renamed for display purposes. For example, in an SQL SELECT query, the AS operator in the select field list can create an alias for one of the returned fields. In a Recordset object based on an SQL query, a field that has been aliased is represented by a Field object whose Name property reflects the alias, not the original field name. To find out the original field name, check the Field object’s SourceField property.