If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Format number field to show Percent
How do I format a field so whenever a number is enter, the field
automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! |
#2
|
|||
|
|||
Format number field to show Percent
Kaylen
Take another look at how percents are calculated. 10 = 1000%! If you want to see 10%, enter .10 instead. Or if you want to be able to enter "10" and have Access convert that to 10%, you'll have to build a function that takes what you put in and divides by 100. Regards Jeff Boyce Microsoft Office/Access MVP "Kaylen" wrote in message ... How do I format a field so whenever a number is enter, the field automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! |
#3
|
|||
|
|||
Format number field to show Percent
On Jan 23, 4:43*pm, Kaylen wrote:
*How do I format a field so whenever a number is enter, the field automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! How about entering 10% as .10? Otherwise you have to use the beforeinsert event to divide by 100... |
#4
|
|||
|
|||
Format number field to show Percent
I would like to have the user enter 10 and it will just be 10%
What would be a code to put in After Update so that the number entered in that field to be divided by 100? Thanks "Jeff Boyce" wrote: Kaylen Take another look at how percents are calculated. 10 = 1000%! If you want to see 10%, enter .10 instead. Or if you want to be able to enter "10" and have Access convert that to 10%, you'll have to build a function that takes what you put in and divides by 100. Regards Jeff Boyce Microsoft Office/Access MVP "Kaylen" wrote in message ... How do I format a field so whenever a number is enter, the field automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! |
#5
|
|||
|
|||
Format number field to show Percent
Piet offers a way to do that...
Regards Jeff Boyce Microsoft Office/Access MVP "Kaylen" wrote in message ... I would like to have the user enter 10 and it will just be 10% What would be a code to put in After Update so that the number entered in that field to be divided by 100? Thanks "Jeff Boyce" wrote: Kaylen Take another look at how percents are calculated. 10 = 1000%! If you want to see 10%, enter .10 instead. Or if you want to be able to enter "10" and have Access convert that to 10%, you'll have to build a function that takes what you put in and divides by 100. Regards Jeff Boyce Microsoft Office/Access MVP "Kaylen" wrote in message ... How do I format a field so whenever a number is enter, the field automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! |
#6
|
|||
|
|||
Format number field to show Percent
On Fri, 23 Jan 2009 15:50:01 -0800, Kaylen
wrote: I would like to have the user enter 10 and it will just be 10% What would be a code to put in After Update so that the number entered in that field to be divided by 100? Private Sub controlname_AfterUpdate() If Me!controlname 1.0 Then ' don't change unless it needs changing Me!controlname = Me!controname / 100 End If End Sub -- John W. Vinson [MVP] |
#7
|
|||
|
|||
Format number field to show Percent
On Fri, 23 Jan 2009 15:45:11 -0800, Piet Linden wrote:
On Jan 23, 4:43Â*pm, Kaylen wrote: Â*How do I format a field so whenever a number is enter, the field automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! How about entering 10% as .10? Otherwise you have to use the beforeinsert event to divide by 100... Isn't one of the features of 2007 that you can enter percentages without the decimal point now? -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#8
|
|||
|
|||
Format number field to show Percent
With interest rates going the way they are it would be rash to assume that
only values of 1% or more might be entered. Ken Sheridan Stafford, England "John W. Vinson" wrote: On Fri, 23 Jan 2009 15:50:01 -0800, Kaylen wrote: I would like to have the user enter 10 and it will just be 10% What would be a code to put in After Update so that the number entered in that field to be divided by 100? Private Sub controlname_AfterUpdate() If Me!controlname 1.0 Then ' don't change unless it needs changing Me!controlname = Me!controname / 100 End If End Sub -- John W. Vinson [MVP] |
#9
|
|||
|
|||
Format number field to show Percent
On Sun, 25 Jan 2009 10:14:03 -0800, Ken Sheridan
wrote: My suggestion will prevent values over 100% from being entered. I hope interest rates don't go THAT high! With interest rates going the way they are it would be rash to assume that only values of 1% or more might be entered. Ken Sheridan Stafford, England "John W. Vinson" wrote: On Fri, 23 Jan 2009 15:50:01 -0800, Kaylen wrote: I would like to have the user enter 10 and it will just be 10% What would be a code to put in After Update so that the number entered in that field to be divided by 100? Private Sub controlname_AfterUpdate() If Me!controlname 1.0 Then ' don't change unless it needs changing Me!controlname = Me!controname / 100 End If End Sub -- John W. Vinson [MVP] -- John W. Vinson [MVP] |
#10
|
|||
|
|||
Format number field to show Percent
Hi Kaylen,
Just make your field a Number / Single field and set it's format to Percent. For Access 2007: user just enters 10. Earlier versions: user enters 10%. It will store as .1 and display as 10%. Clifford Bass "Kaylen" wrote: How do I format a field so whenever a number is enter, the field automatically make that entry a Percent. I tried formattting the number to Percent but when I entered for example 10, I get 1000%. How do I get the field to show 10% when I enter 10? Thankyou for your help!! |
Thread Tools | |
Display Modes | |
|
|