Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Mar 2003
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combining number fields (2003)

    I have 2 fields that each have numbers. The first field is called MileageInt, and is a Long Integer. It is for the dollar amount. The second field is called MileageDec and is also a Long Integer. It is for the cents amount. I am trying to combine them into one number. I've tried:
    FormatNumber(([MileageInt] & Chr(46) & [MileageDec]),2)
    but it seems to round up and put zeros in the cents part. So, for example if MileageInt is 100, and Mileage Dec is 90, I want it to return 100.90 as a number. I need to add some numbers together later.

    Help!

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

    Re: Combining number fields (2003)

    Use [MileageInt]+[MileageDec]/100

    BTW, why not use one currency field?

  3. #3
    Lounger
    Join Date
    Mar 2003
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining number fields (2003)

    I'm importing it from another database. I don't know why they broke it up into 2 fields.

    Thanks! It worked.

Posting Permissions

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