MatthewL Posted October 22, 2019 Posted October 22, 2019 I have a query in Access and I have 1 column which I need to filter if it has less than x characters in that column. Is there a way to do it? I did try =Len([column]) <="x" but that didn't work. Any suggestions?
TLARWise Posted October 22, 2019 Posted October 22, 2019 Add a new column to the query with =Len([column]) as the field and then filter that column using <=x as the criteria.
MatthewL Posted October 22, 2019 Author Posted October 22, 2019 Thanks, if I wanted to do more than x character presume just replace with >? I did try but it doesn't seem to work for greater than.
TLARWise Posted October 22, 2019 Posted October 22, 2019 using >x should work, alternatively you can use >= but increase the character count by one (ie: if you want greater than 8 you can use >=9).
MatthewL Posted October 22, 2019 Author Posted October 22, 2019 Thanks, will take a look. Just done some manual checks re <="x" and it doesn't include them all, anything else I should be aware of?
TLARWise Posted October 23, 2019 Posted October 23, 2019 When using numbers in a criteria you don't need to use quotes. When testing this didn't seem to make a difference for me but we use Office 2016 so 2010 may be more picky.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now