Microsoft KB Archive/304522

= ACC2002: Cannot Switch to Data Entry Mode on a Form If a WHERE Clause Is Used to Open the Form =

Article ID: 304522

Article Last Modified on 9/25/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q304522



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
When you click Data Entry on the Records menu of a form, nothing happens. The form does not switch to data entry mode.



CAUSE
A WHERE clause was used to open the form. When a WHERE clause is used to open a form, a server filter is applied to the form. After a server filter is applied to a form, you cannot use the form for data entry.



RESOLUTION
To work around this behavior, create a sample of a local filter on the form, and then switch the form to data entry mode. To do so, follow these steps:
 * 1) Open the sample Access project NorthwindCS.adp.
 * 2) Open the Orders form in Form view.
 * 3) Click a customer name in the Bill To box.
 * 4) On the Records menu, point to Filter, and then click Filter By Selection.

Note that Access returns the filtered records.
 * 1) On the Records menu, click Data Entry.

Note that the form switches to data entry mode.



Steps to Reproduce the Behavior
 Open the sample project NorthwindCS.adp. Press ALT+F11 to open the Visual Basic Editor. If you do not see the Immediate window, click Immediate Window on the View menu.  Type the following code in the Immediate window, and then press ENTER: DoCmd.OpenForm &quot;Orders&quot;, WhereCondition:=&quot;CustomerID = 'ALFKI'&quot; Note that the Orders form opens with six records.  On the Records menu, click Data Entry.

Note that nothing happens. The form does not switch to data entry mode.</li></ol>

<div class="references_section">