ACC2000: Filter By Form or Selection Changes DataEntry Property
ID: Q198948
|
The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
When you use Filter By Selection or Filter By Form commands on a form that
has its DataEntry property set to Yes, Microsoft Access changes the
property setting to No so that it can display the filtered records.
This behavior is the same for both main forms and subforms.
CAUSE
Microsoft Access sets the DataEntry property of the form to False so that it can display the filtered records.
RESOLUTION
If you want to use your form only for data entry, you can do one of the
following:
- Use custom menus and toolbars with your form so that users cannot carry out the Filter By Form or Filter By Selection commands. This is the recommended method.
- Use Visual Basic code or a macro in the Current event of the form to
reset the DataEntry property to True. Although this method does work, it can slow down performance of your form when users click the Filter By Form or Filter By Selection commands.
MORE INFORMATION
Steps to Reproduce Behavior
- Start Microsoft Access and open the sample database Northwind.mdb.
- Use the AutoForm: Columnar Wizard to create a new form based on the
Customers table.
- Switch to Design view and set the following properties of the form:
Property |
Value |
AllowEdits |
No |
AllowDeletions |
No |
AllowEdditions |
Yes |
DataEntry |
Yes |
- Save the form as AddCustomer, and then switch to Form view.
- On the Records menu, point to Filter, and then click Filter By Form.
- Select WA in the Region field.
- On the Filter menu, click Apply Filter/Sort. Note that the form displays existing records.
- Press CTRL+G to open the Immediate window.
- Type the following line in the Immediate window, and then press ENTER:
?Forms!AddCustomer.DataEntry
Note that the value of the DataEntry property is False.
REFERENCES
For more information about the Current event, click Microsoft Access Help on the
Help menu, type "OnCurrent property" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.
Additional query words:
Keywords : FmsSubf FmsProp FmsProb
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb