ACC2000: Wrong Results Using Filter By Form on Hyperlink Field (202131)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q202131
Moderate: Requires basic macro, coding, and interoperability skills.

SYMPTOMS

On a Hyperlink field in a Filter By Form, if you use the Like operator with an asterisk (*) as the last character of the lookup value, more records than expected may be returned.

CAUSE

The Filter By Form will append an extra asterisk at the beginning of the lookup value.

For instance, if you have two records, one with a Hyperlink field of ABC and another with a Hyperlink field of 123ABC, when you enter Like "ABC*" in the criteria of the Filter By Form, both records will be returned. Filter By Form has changed the criteria to Like "*ABC*".

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new table called tblTest:
          Table: tblTest
          -------------------------
          Field Name: ID
             Data Type: AutoNumber
          Field Name: testHyperlink
             Data Type: Hyperlink
    					

  2. Create a new form called frmTest based on tblTest.
  3. Add the following records. Note you do not need valid hyperlinks to test this:

    IDtestHyperlink
    1123ABC456
    2ABC123
    3As Easy as 123
    4ABCtestABC
  4. On the Records menu, point to Filter, and then click Filter By Form.
  5. Type Like "ABC*" in the testHyperlink field.
  6. On the Filter menu, click Apply Filter/Sort.
Note that all the records containing ABC are returned when you would expect only records 2 and 4 to be returned. It is as if you had typed Like "*ABC*" in the field.

REFERENCES

For more information about the Filter by Form feature, click Microsoft Access Help on the Help menu, type filter by form, blank form in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbprb KB202131