Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Question (2003)

    I have an Access query that returns results that are formatted as follows:

    077-00-0110.00

    Is it possible to modify my query to return the above like so...

    077000110000

    Basically, it's stripping out all of the dashes and period and adding a trailing zero. Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Question (2003)

    Is this a numeric field or a text field?

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Question (2003)

    My bad Hans, the field is a text field. I've been able to add the following to add the trailing zero. Now for the clean up<img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Expr1: [Account]+"0"

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formatting Question (2003)

    Try:
    <code>
    Expr1: Replace(Replace([Account],"-",""),".","") & "0"
    </code>
    The Replace function is used twice, to remove "-" and to remove ".".

  5. #5
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Question (2003)

    I learn something new everyday. I debated using the left, mid, and right text functions, but this is soooooooooooo much cleaner. Big thank you!!!

Posting Permissions

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