Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formating (Access 2002, Microsoft Office XP)

    The database I am currently working on imports a text file. This text file is put into a table. In the table the amount data type is text. I am trying to format this amount in a text box on a form. The user sees the amount on the form as 000003421, however I would like them to see it as $34.21. In the text box properties, I have tried to modify this using the Format and Decimal Place properties and separately have tried to modify it under the Control Source property as =(format(val(tran_amt)),"$0,000.00"). However when I use the control source as described above I am getting error# in the text box on the form. Any suggestions?

  2. #2
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating (Access 2002, Microsoft Office XP)

    Hi deehagy!

    Looks like you've just got one of your parentheses in the wrong place. Try: (Format(Val(tran_amt),"$0,000.00"))

    Sam

  3. #3
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating (Access 2002, Microsoft Office XP)

    I am still getting #error.

  4. #4
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating (Access 2002, Microsoft Office XP)

    Instead of placing that expression as the control source for your control try creating a query for your recordsource and place that expression there. Then set the control source to the field name in your query.

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

    Re: Formating (Access 2002, Microsoft Office XP)

    Try a text box with control source
    <code>
    =<!t>[tran_amt]<!/t>/100
    </code>
    and set its Format property to Currency.

  6. #6
    Lounger
    Join Date
    Apr 2003
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating (Access 2002, Microsoft Office XP)

    I used the information you gave me for the form text box properties. Then made related changes to the query that populates the table thats viewed by the form and made changes to the table that receives the information and all worked out. Thanks for your help!

Posting Permissions

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