The result of the Len function is a numeric value.
Use Len([adress]) > 33 rather then Len([adress]) > "33"
Greetings, MJ
-----Oorspronkelijk bericht-----
Van: [email protected]
[mailto:[EMAIL PROTECTED] Patrick Briggs
Verzonden: dinsdag 25 april 2006 23:20
Aan: [email protected]
Onderwerp: [Access VBA Central] why Len criteria not working
This is going to be one of those 'duh, I should have known' questions.
I have a table with an address field ([address1]). It's a text field
with 255 max.
There are addresses of varying lengths. Including in this data are PO
Boxes and normal addresses:
For example:
19120 Chandlers Landing Dr Apt 301
PO Box 44
PO Box 56
16455 E Avenue of the Fountains Apt A133
When I try to run a query on this field where the
Len([address1])>"33"
it includes all of the above.
When I add an extra column to my query that I label as [Length]
Length:Len([address])
and then set the criteria for:
>33
it works fine and I don't see the PO Box values.
Why wouldn't the first way of doing this not work? I can see the
length of the PO Box values as 9; they should not have been picked up
yet were.
Hope somebody can help.
Regards,
Patrick Briggs,
Pasadena, CA
Yahoo! Groups Links
SPONSORED LINKS
| Microsoft access database | Database development software | Microsoft access development |
| Database management software | Inventory database software | Membership database software |
YAHOO! GROUPS LINKS
- Visit your group "AccessVBACentral" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
