ACC2000: Controls Are Not Automatically Rebound After You Change the RecordSource Property (203179)
The information in this article applies to:
This article was previously published under Q203179 Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you change the RecordSource property of a data access page that has bound controls, the controls on that page are unbound. If you then reset the RecordSource property of that same page to the original value, the controls are not automatically rebound to their original ControlSource property value. To rebind the controls, you must manually reset each control on the page.
For example, if you have a properly functioning page that is bound to a table named Employees, and you change the RecordSource property to Customers, and then back to Employees, the controls on that page will display the #Name? value. The ControlSource property for each control on the page will be set to a valid field name in the Employees table, but because they are not automatically rebound to the recordset, it will appear as though the controls are not bound properly.
CAUSE
A new recordset is created each time that you change the RecordSource property. The values in the ControlSource properties are not retained and rebound when the new record set is created.
RESOLUTION
To work around this problem, do the following for each of the bound controls:
- Select the control.
- If the property sheet is not displayed, click Properties on the View menu, and then click the Data tab.
- If the field is bound to a column, select the column from the ControlSource list.
If the field is bound to an expression, retype the expression in the ControlSource property box.
Modification Type: | Minor | Last Reviewed: | 7/16/2004 |
---|
Keywords: | kbDAP kbprb KB203179 |
---|
|