Results 1 to 7 of 7
  1. #1
    Paintballlovr is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    96

    formatting dollar amounts with missing decimals

    I have a field that is dollars and cents, but with no decimal. Is there an easy way to insert a decimal or can anyone suggest any formatting adjustments. I tried to get creative and concatenate everything to the left of the last two positions + "." + the last two positions and it almost worked. There was one record that failed and I'm glad it did or I might not have realized it wasn't working. An example is one of the records says 5467377, which is actually 54673.77. My concatenation attempt failed on capturing the left side of the amount:


    Code:
     Left([sumofbank_amount],(InStr([sumofbank_amount],(Right([sumofbank_amount],2)))-1))

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Where exactly are you trying to display this?
    In a Query? Form? Report?

    What is the Data Type of the "sumofbank_amount" field in the underlying table?
    Why not just format the field to show the two decimal places?
    If you use Text functions on it, it could convert the value to Text, and then mathematical computations may not work properly on them.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    use Currency data type, or format.
    it will provide the decimal, unless your actual # is an integer (cents with no decimal?)

  4. #4
    Paintballlovr is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2013
    Posts
    96
    I eventually need to match it to another table which also has a dollar amount. The field imported as field size double, format general number, decimal places auto.

  5. #5
    Paintballlovr is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2013
    Posts
    96
    currency turns 10000 into 10000.00, but I need it to be 100.00

  6. #6
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    What about dividing it by 100 and then converting to currency.

  7. #7
    Paintballlovr is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2013
    Posts
    96
    That did the trick. Its funny how sometimes I try to come up with elaborate solutions and the fix comes down to basic math. Thanks to everyone for your help.

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

Similar Threads

  1. Formatting amounts
    By jllcpa in forum Access
    Replies: 7
    Last Post: 05-03-2018, 03:12 PM
  2. Decimals, formatting maybe currency.
    By Perfac in forum Programming
    Replies: 3
    Last Post: 01-27-2018, 09:24 AM
  3. Commas & Decimals Formatting
    By Eddy Sincere in forum Reports
    Replies: 9
    Last Post: 08-25-2016, 02:02 AM
  4. Replies: 12
    Last Post: 01-19-2016, 08:07 AM
  5. Replies: 3
    Last Post: 01-13-2012, 01:15 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