Results 1 to 7 of 7

Thread: Currency field with Decimal

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Posts
    164

    Unhappy Currency field with Decimal

    I have a problem with access field which currency type I have put it as 3 decimal, when I type something like 1.655 it works fine and save it the same like 1.655 in the table but when I type 1.500 it saves only 1.5 in the table is there away to save it like 1.500 and show 00??

    Thanks in advance.

  2. #2
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    Re: Currency field with Decimal

    Originally posted by mohsinof
    I have a problem with access field which currency type I have put it as 3 decimal, when I type something like 1.655 it works fine and save it the same like 1.655 in the table but when I type 1.500 it saves only 1.5 in the table is there away to save it like 1.500 and show 00??

    Thanks in advance.
    Yeah, use string instead of currency ...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Posts
    164
    Yeah, use string instead of currency
    But there is no string data type in access ??!!

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Posts
    164
    I tried to but in my vb code

    VB Code:
    1. Format(x,"0.000")
    Where x is the value

    but still is shows 1.5 instead of 1.500 , it doesn't shows only the last two zero but when I type 3.355 it shows the three decimal places 3.355 !!

    Any further help??

  5. #5
    Frenzied Member mxnmx's Avatar
    Join Date
    Dec 2001
    Location
    I'm back...now!!!
    Posts
    1,396
    I think:
    Change your MS ACCESS field from Currency to Text

    And

    VB Code:
    1. Format(x,"0.000")

    You know the field in Access is set to currency so whatever you save there will be saved as its saving now. So change it to Text and then use the code above. It shd work all well!!!
    Can't Remember Birthdays or Important Dates- Never Miss any Important Date(s)

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Posts
    164
    But I would like to make calculation on that field like

    Currency_Field *0.5

    if it is text it will not calculate??

    Thanks again

  7. #7
    Frenzied Member mxnmx's Avatar
    Join Date
    Dec 2001
    Location
    I'm back...now!!!
    Posts
    1,396
    If you wish to perform calculations you can do this:

    VB Code:
    1. Currency_Field * Val(Text1.Text) 'This will convert string to integer data type...so that you can perform calculations...
    Can't Remember Birthdays or Important Dates- Never Miss any Important Date(s)

Posting Permissions

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



Click Here to Expand Forum to Full Width