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



The information in this article applies to:

  • Microsoft Access 2002

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.
  5. On the Records menu, click Data Entry.

    Note that the form switches to data entry mode.

MORE INFORMATION

Steps to Reproduce the Behavior

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

    Note that nothing happens. The form does not switch to data entry mode.

REFERENCES

For more information about about creating local filters on forms, click Microsoft Access Help on the Help menu, type Form Filter in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MajorLast Reviewed:9/25/2003
Keywords:kbprb KB304522