Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    string length ? (access 2003)

    I was looking for a way to find a string length of 4 in my field called site in my query and add the prefix acc to the front of my string of 4 numbers. So the data is stored 1234 and I want to add acc to display the data as acc1234. If it's stored 12345 I want to leave it alone. How can this be done? Thanks.....

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: string length ? (access 2003)

    Create a query based on your table.
    Select Query | Update Query.
    Add the Site field to the query grid.
    Enter "acc" & [Site] in the Update to line.
    Create a calculated column

    Length: Len([Site])

    Enter 4 in the Criteria line for this column.
    Execute the query.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts