Results 1 to 12 of 12
  1. #1
    Join Date
    Aug 2004
    Posts
    173

    Unanswered: Format Percent so 11.00% is not 1100.00%

    I have a form with a numeric field formatted to Percent

    the field is an integer with 2 decimal places

    When I type in 11.00 it comes out as 1100.00%

    The requirement is to have the % symbol in the field

    if I take the Percent format out 11.00 displays correctly.

    If I enter .011 then it comes out as 11.00% but I want the user to enter a value of 11.00 and have it format to 11.00% instead of the user having to enter .011


    I remember seeing something about this on the web, but cannot seem to fnd info now.

    Thanks - AB

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if you use the "%" as a format Access expects the value to be be displayed to be
    category
    ----------
    Population

    NOT

    category
    ---------- X 100
    Population

    so you need to adjust your formula accordingly, or change the setting of the column to be
    =[value] & "%" 'for a bound column

  3. #3
    Join Date
    Aug 2004
    Posts
    173

    This is a Textbox Not a Column

    I am trying to let the user type in 11.00 and have the textbox show 11.00% instead of 1100.00% as it is now.







    Quote Originally Posted by healdem
    if you use the "%" as a format Access expects the value to be be displayed to be
    category
    ----------
    Population

    NOT

    category
    ---------- X 100
    Population

    so you need to adjust your formula accordingly, or change the setting of the column to be
    =[value] & "%" 'for a bound column

  4. #4
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    why not add some code like this

    Code:
    Private Sub Text2_Exit(Cancel As Integer)
        Text2.Value = Text2.Value / 100
    End Sub
    but should you not be calculating percentage from values entered rather than typing it in

    All the Best
    Dave

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    simplest...
    format as a normal number not percentage and add a label with "%" in it just right of the textbox.

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Yup, go with Izy on that one...
    as an alternative you could place a label containing the % adjacent to the text box, right justify the text box.......

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I would suggest changing the value being stored over changing the way it is presented later. There are some mathematical pecularities that might nip you later if you proceed the way you're going. If you want to use the figure in a calculation for example, you would have to divide the value by 100 for each instance you use it in. All-in-all, for confusion and consistancy sake, I would heartily recommend storying the value as a true percentage.

    [/2cents]
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Quote Originally Posted by Teddy
    There are some mathematical pecularities that might nip you later if you proceed the way you're going. If you want to use the figure in a calculation for example, you would have to divide the value by 100 for each instance you use it in.
    oh no,no,no,no,no

    mathematics on weighted values, i would seriously recomend that you didnt do that

    Dave
    BSc Mathematical Sciences
    Last edited by DavidCoutts; 01-31-05 at 14:16.

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    oh no,no,no,no,no

    mathematics on weighted values, i would seriously recomend that you didnt do that

    Dave
    BSc Mathematical Sciences
    I must have missed the part in my consumer math class where you're supposed to rewrite:
    100 * .5
    to
    100 * (50 / 100)

    But alas, I have no degree.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  10. #10
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    above is correct,

    Just try simple maths on percentages,
    like averages etc. youll probably notice it doesnt work, unless you use the weighted denominator 50% + 50% does not equal 100% only in 1 special case does it work where both denominators are identical,

    im not arguing that your statement was incorrect but when i read it quickly it implied mathematics was feasable on percentiles(or weighted differrences) much better to go back to base leval and calculate from there

  11. #11
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by DavidCoutts
    above is correct,

    Just try simple maths on percentages,
    like averages etc. youll probably notice it doesnt work, unless you use the weighted denominator 50% + 50% does not equal 100% only in 1 special case does it work where both denominators are identical,
    What sort of swahili math is this?

    (.25 + .5 + .75) / 3 = .5

    does it not?

    And what's this 50% + 50% != 100% business?

    I don't doubt that there's some theory behind it, but I've never encountered inconsistency when dealing with percentages in calculations. I'd be interested in reading whatever you may have on the topic though.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  12. #12
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Ok im changing this post to the proper argument

    say you walk from point A to point B and you go 50% of the way to point C
    then you walk from point C to point B and go 50 % of the way to point D

    Have you gone all the way from point A to Point B
    you have gone 100% of the way fom point A to point D
    but only 75% between point A and Point B

    what people need to understand is a percentage is a weighted figure
    hence you cant make any real assessment of things,
    you always need a point of reference to what your talking about, things always get more complicated when your talking about groups of things

    i.e 50% of things have A, 50 % of things have B
    to understand how many have things in A and B you need to now how many things are in A and B and then both independently
    All you can say is that 50 - 100 % of things have either A or B

    gosh isnt life fun
    Last edited by DavidCoutts; 02-01-05 at 05:07. Reason: Proper argument

Posting Permissions

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