Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    2

    criteria to limit # of characters in a query result.

    i have been given a spreadsheet with a particular column which i need to query.
    i have transfered the data to an access db and now i want to format that column to have 8 numbers.
    below is the column which i want to format. The format criteria is that it has to start with at least one 0 and the total number of characters must not exceed 8.
    search
    0000000029402
    0000000029855
    0000000030416889
    0000000030524830
    0000000095A495
    0000000095A496
    0000000095A798
    0000000095C049
    000000009000189
    00000000990702
    00000000994831
    00000000919645
    00000000919646
    00000000919647
    how can i do this??



    thanks.

  2. #2
    Join Date
    Jul 2008
    Location
    Alexandria, Egypt.
    Posts
    38
    Dear Valdense,

    You can create query based on this table
    Open the design view of the query
    Assume that the field name is ID
    Replace ID with the following:
    ID: Right([ID],8)
    Save and close


    Please try and give me feedback

    Thanks

    Ahmed

  3. #3
    Join Date
    Aug 2008
    Posts
    2
    Hi Ahmed,

    yes your solution does work.

    thanks for your help.

    cheers

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

Similar Threads

  1. Query Criteria
    By Texaine in forum Queries
    Replies: 1
    Last Post: 01-24-2018, 02:36 PM
  2. crosstab query criteria
    By Sharron in forum Queries
    Replies: 3
    Last Post: 12-15-2011, 04:31 AM
  3. Result of Count Query not known elsewhere
    By Carole in forum Access
    Replies: 1
    Last Post: 09-07-2008, 09:39 AM
  4. Query Criteria
    By jena in forum Access
    Replies: 1
    Last Post: 08-03-2008, 04:08 AM
  5. Query Criteria
    By jena in forum Queries
    Replies: 1
    Last Post: 04-29-2008, 11:00 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