Microsoft KB Archive/187345

= ACC97: Wrong Results Using Filter By Form on Hyperlink Field =

Article ID: 187345

Article Last Modified on 1/23/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q187345



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 this to be a problem in Microsoft Access 97.



Steps to Reproduce Behavior
  Create a new table called tblTest:

     Table: tblTest -     Field Name: ID         Data Type: AutoNumber Field Name: testHyperlink Data Type: Hyperlink  Create a new form called frmTest based on tblTest.  Add the following records. Note you do not need valid hyperlinks to test this:

     ID          testHyperlink --     1           123ABC456 2          ABC123 3          As Easy as 123 4          ABCtestABC  On the Records menu, point to Filter, and then click Filter By Form.</li> Type Like "ABC*" in the testHyperlink field.</li> 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.</li></ol>

<div class="references_section">