| If you are linking on multiple fields, add a calculated
field to the main form that concatenates the fields. Then create a calculated
column in the subform's RecordSource property query with the same expression. For example, to link to
the subform on an Employee ID field and an Order ID field, add a text box to
the main form with the following properties:
Name: EmployeeIDOrderID
ControlSource: =[EmployeeID] & [OrderID]
Next, add the following field to the query that the subform is
based on:
EmployeeIDOrderID: [Employee ID] & [Order ID]
Finally, link the main form and the subform on the concatenated
field rather than on the two individual fields. The subform properties may
appear as follows:
LinkChildFields: EmployeeIDOrderID
LinkMasterFields: EmployeeIDOrderID
Because Microsoft Access has to compare only one criteria to
return the subform's recordset, the subform's performance should improve.
|