strange criteria on filter for in Access XP

B

Brian

Using the "Filtor For:" function on a text field in a table we get peculiar
results without a logical answer.

The field contains accounts head office number with numbers and text eg:

006400
064001
0X7810
FOR001

if you filter for 006400 with quotes it returns correct results
if you filter for "0X7810" it returns correct results
if you filter for 0X7810 without quotes it returns no results
if you filter for 064001 = no results

It appears as if an account just has 1 zero in front it will not filter
unless it is in quotes. All other combinations of numbers and charecters will
return the same results regardless of quotes or not.

Could not find any explanations in microsoft
 
O

Ofer

When you filter on a string field you need to add quote before and after, if
you dont add the quote the field will treat it as a number, and as such it
will remove the 0 in the beginning of the parametes

To filter on number, no need for quotes
To filter on string add quotes before and after the parameter
To filter on date field add # before and after thedate
 
Top