ACC2002: Server Filter By Form Incorrectly Converts Date Criteria (296048)



The information in this article applies to:

  • Microsoft Access 2002

This article was previously published under Q296048
Advanced: Requires expert coding, interoperability, and multiuser skills.

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

SYMPTOMS

When you enter a date range in a Server Filter by Form window, search for records, and then return to the Server Filter by Form window, date criteria is incorrectly converted to Microsoft Jet syntax.

For example, if you enter the date criteria > 1/1/2001 in the Server Filter by Form window, before applying the server filter, it correctly converts this to > '1/1/2001'.

However, after the server filter is applied, if you then try to enter a new date range, it is incorrectly converted to the Jet-based syntax of > #1/1/2001#.

RESOLUTION

Edit the ServerFilter property and change the number sign (#) to an apostrophe (') before you re-apply the server filter. Or, when you enter date criteria, enclose the dates in apostrophes.

STATUS

Microsoft has confirmed that this is a problem in Microsoft Access.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Access.
  2. On the Help menu, point to Sample Databases, and then click Northwind Sample Access Project.
  3. Open the Employees form in Design View.
  4. Set the ServerFilterByForm property to Yes, and then close and save the form.
  5. Open the form. Note that the form is in server filter mode.
  6. Enter the following filter for the Hire Date field

    > 1/1/1993

    and then press the TAB key.
  7. Note that the date is correctly converted to > 1/1/1993.
  8. Apply the server filter by clicking Apply Server Filter on the Filter menu.
  9. Switch back to filter mode by pointing to Filter on the Records menu, and then clicking Server Filter By Form.
  10. Enter the following filter for the Hire Date field

    > 1/1/1992

    and then press the TAB key.
  11. Note that when you press the TAB key, the filter is incorrectly converted to the following:

    >#1/1/1992#


Modification Type:MajorLast Reviewed:9/27/2003
Keywords:kbbug kbnofix KB296048