Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316

    Unanswered: Currency values in Text Box

    I'm trying to create a simple report in a letter format to send to clients informing them of cash amounts due for settlement. I have a text box with the following control source:

    ="The amount due on your account is " & [Value] & " which must be settled within 10 days of receipt of this notice."

    The field Value is set to Currency data type, as is the format of the above text box. However, when running the report, trailing zeros are omitted from the output. So, if Value = 1234.50, the output shows as:

    The amount due on your account is 1234.5 which must be settled within 10 days of receipt of this notice.

    When I alter the text box to:

    = [Value]

    The currency value is displayed correctly, it's only when I add text to it that the trailing 0's are omitted.

    Any suggestions?

  2. #2
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    use the format command.
    for example:

    Format([value];"$#,000.00")

  3. #3
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    Thanks for the reply. I tried your suggestion in VBA but it would not compile in the format you posted. So, I tried this (Text69 is the name of the text box with the control source in it):

    Text69.Format = "$#,000.00"

    That compiled OK, but it had no effect, trailing zeros are still missing.

    Any other ideas?

  4. #4
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    You cannot set the entire format = "$#,000.00" because you have other text involved.

    Achiola's comment seems to make sense. Use a comma instead of a semicolon.


    control source = "The amount due on your account is " & Format([value],"$#,000.00") & " which must be settled within 10 days of receipt of this notice."
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  5. #5
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    Thanks a lot. I just tried it, and it works perfectly.

Posting Permissions

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