Results 1 to 6 of 6
  1. #1
    ssyah is offline Novice
    Windows Vista Access 2003
    Join Date
    Jan 2010
    Posts
    3

    Query to display entries of 14 characters or more

    Hello,


    I have a table (containing over 100,000 entries) which has a (text) field containing entires ranging from 1 character to 17 characters long. I am triying to create a query which will only list entries which have 14 or more characters. Can someone help me on this please?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Where Len([YourField] > 13

  3. #3
    ssyah is offline Novice
    Windows Vista Access 2003
    Join Date
    Jan 2010
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    Where Len([YourField] > 13
    Hi RuralGuy,

    I have tried this and a lot of variations of the this and when I run the query it is still lists entries < 13 characters long.

    I have found a work around - where Len([YourField])="14", Len([YourField])="15", Len([YourField])="16" etc all work so i can run these and then append them I get the same result. This is a tad time-consuming so I would appreciate it if somebody could give me the code to run it all in one go.

    thanks again!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Add another field to your query set to =Len([YourField]) and then add a criteria of > 13

  5. #5
    ssyah is offline Novice
    Windows Vista Access 2003
    Join Date
    Jan 2010
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    Add another field to your query set to =Len([YourField]) and then add a criteria of > 13
    I had just found the solution. Thanks all the same RuralGuy.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What was the solution you found?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query to display in single row
    By access in forum Queries
    Replies: 10
    Last Post: 01-14-2010, 11:40 AM
  2. display query results in a form
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 08-14-2009, 03:02 PM
  3. Replies: 0
    Last Post: 04-03-2009, 01:15 PM
  4. Replies: 2
    Last Post: 08-04-2008, 04:16 PM
  5. Query to Display Tables & Fields
    By foxerator in forum Queries
    Replies: 0
    Last Post: 04-24-2008, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums