Microsoft KB Archive/90135

{|
 * width="100%"|

PRB: Form Displays Data from Deleted Field in Query
'Article ID: Q90135

Creation Date: 11-OCT-1992

Revision Date: 30-NOV-1996' The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

If you have a form based on a query and you remove a field from the query grid, you may still see the data from the deleted field in Form view.

You will not see the data from the deleted field if you save and then reopen the form. The text box will contain the &quot;#Name?&quot; error message.

CAUSE

The form is based on a compiled query. The query must be recompiled before the form recognizes the absence of the deleted field.

RESOLUTION

When the form is closed and reopened, the query is recompiled.

The following procedure describes another way to have the form recompile the query:

NOTE: The following steps do not work in Microsoft Access 7.0 and 97.


 * 1) With the form open in Design view, place the mouse pointer in the text box of the newly deleted field.
 * 2) Press ENTER.
 * 3) On the View menu, click Form. Note the error message in the text box.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

 Start Microsoft Access and open the sample database Northwind.mdb (or NWIND.MDB in Microsoft Access 2.0 or earlier). Create a new query based on the Employees table. Drag the LastName and Title fields to the query grid. NOTE: In versions 1.x and 2.0, there is a space in the Last Name field. Save the query as Query1. Create a new form based on the Query1 query. If the field list is not displayed, on the View menu, click Field List, and then drag all the fields from the field list to the form. Save the form as Form1. Open the Query1 query in Design view, and delete the Title field from the QBE grid. Save and then close the query.</li> View the Form1 form in Form view. Note that the Title field contains the #Name? error.</li></ol>
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

KBCategory: kbusage

KBSubcategory: FmsOthr

Additional reference words: 1.00 1.10 2.00 7.00 97 8.00