Microsoft KB Archive/204191

= ACC2000: Unbound Data Access Pages Cannot Contain Fields Based on an Expression =

Article ID: 204191

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q204191



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
If you set the ControlSource property of a field on an unbound data access page to an expression, you may receive the following error message:

The setting you entered isn't valid for this property. To see the valid settings for this property, search the Help index for the name of the property.



CAUSE
All expressions in data access pages are analyzed by the Microsoft Jet database engine. Until a data access page is bound to a recordset, Jet will not recognize the page and, in turn, the expression will not be evaluated.



RESOLUTION
Bind the data access page to any recordset available by dragging a field from any table or any query to the page. After the schema of the page includes that bound field, you can delete the field from the page, and you can then use expressions as the ControlSource property of other controls on the page. For an example of how to do this, follow these steps:  Open the sample database Northwind.mdb. In the Database window, click Pages under Objects, and then click New. In the New Data Access Page dialog box, click Design View, and then click OK. If the toolbox is not displayed, click Toolbox on the View menu. Add a textbox to the data access page.  Set the ControlSource property of the new text box to the following expression: Expr1: Now Note that you receive the error message described in the "Symptoms" section of this article. Click OK in the error message. </li> If the field list is not displayed, click Field List on the View menu.</li> Drag the CategoryID field from the Categories table to the page.</li>  Reset the ControlSource property of the original text box to the following expression: Expr1: Now </li> On the View menu, click Page View. Note that the text box is correctly populated.</li></ol>

<div class="moreinformation_section">

Steps to Reproduce the Behavior
<ol> Open the sample database Northwind.mdb.</li> In the Database window, click Pages under Objects, and then click New.</li> In the New Data Access Page dialog box, click Design View, and then click OK.</li> If the toolbox is not displayed, click Toolbox on the View menu.</li> Add a text box control to the data access page.</li>  Set the ControlSource property of the new text box to the following expression: Expr1: Now Note that you receive the error message mentioned in the "Symptoms" section of this article. </li></ol>

Additional query words: prb the setting you entered isn t valid for this property

Keywords: kberrmsg kbdap kbprb KB204191

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.