ACC1x: How to Use a Main/Subform with Attached SQL Server TablesID: Q104979
|
When you are using a main/subform and the RecordSource properties of both forms are attached SQL Server tables, performance is reduced. The select syntax is sent to ODBC as a parameter query, in which the data types of the linked fields are not known.
Using a main/subform with attached SQL Server tables results in a
parameter query for the subform's RecordSource property. All fields in
which the linked field of the subform is equal to the linked field in
the main form are selected for the subform. Parameter queries based on
attached ODBC tables run slowly when the data type of the field in the
WHERE clause is unknown.
To work around this problem, use the following procedure:
NOTE: The following example is based on the sample database NWIND.MDB,
in which the Employees and Orders tables are exported, attached, SQL
Server tables. The main form is called frmMain and the subform is
called frmSub. The linked field is Employee_ID. This example also
assumes that the RecordSource properties of the two forms are the
Employees and Orders tables, respectively.
Microsoft Access "User's Guide," version 1.1, page 184
Keywords : kbusage FmsSubf
Version : 1.1
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 27, 1999