strange criteria on filter for in Access XP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top