Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2004
    Posts
    18

    Unanswered: Format textbox on a report problem

    I have a report in MS Access XP with a textbox bound to number field. I want to display the number as 12 123,12 (a space for the thousands separator, a comma as decimal point and 2 decimals).
    In the format property of the textbox I type in ##\ ##0,00
    Access doesn't accept this setting and changes it to # 0,0 witch gives a wrong result.

    Can anyone help me with this ?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    Private Sub Form_Load()
    Me!Text0.Format = "##\ ##0,00"
    End Sub
    Give that a try?

    I think this works
    -----------------------------------
    EDIT: Ignore this - it doesn't work.
    Last edited by gvee; 01-29-07 at 11:44.
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ...thats not a standard format Ive heard of
    .. if the internationlisation setting of windows cannot handle it then you may need to write your own function to do it

    you could probably use format to get near the answer, and then use replace to do any final processing
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by healdem
    you could probably use format to get near the answer, and then use replace to do any final processing
    Perhaps format as a standard number (12,345.67) and then use Replace() to swap commas for spaces?
    Remember, Replace works like this:

    Code:
    Replace(<Expression>, <FindThisString>, <ReplaceWithThisString>)
    -------------------------------------------------------
    EDIT: Removed complete answer.

    -GeorgeV
    Last edited by gvee; 01-30-07 at 04:38.
    George
    Home | Blog

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ...yeah thats fine

    ... however I thought Naverty might get more from the problem by having to do soemthing for themselves. I think its always a fine line between helping / assisting and provdiing an answer. The former hopefully encourages people to to come to their own solutions, the latter can encourage a dependancy. It also helps if the first stab into the VB/VBA would behind the scenes in Access is farily straightforward.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    My apologies, I got ahead of the game a bit there.

    *contemplates editing last post to remove the complete answer*
    George
    Home | Blog

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by georgev
    My apologies, I got ahead of the game a bit there.

    *contemplates editing last post to remove the complete answer*

    george... nae bother
    its a public forum for people to contribute as they see fit

    ..great to see you and others pitching in.. keep up the good work
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Hehe, bit late for that - I have already edited the post.

    You're totally right though - nobody will ever learn if the answer is just given to them. That's part of the reason I love programming (Yes, I know!); because it's just a series of new challenges/problems that need a solution!

    I guess if Naverty still can't do this in days to come I can post the full answer again.

    - GeorgeV
    George
    Home | Blog

Posting Permissions

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