A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Format number field to show Percent



 
 
Thread Tools Display Modes
  #1  
Old January 23rd, 2009, 10:43 PM posted to microsoft.public.access.tablesdbdesign
Kaylen
external usenet poster
 
Posts: 133
Default 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  
Old January 23rd, 2009, 11:42 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old January 23rd, 2009, 11:45 PM posted to microsoft.public.access.tablesdbdesign
Piet Linden[_2_]
external usenet poster
 
Posts: 280
Default 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  
Old January 23rd, 2009, 11:50 PM posted to microsoft.public.access.tablesdbdesign
Kaylen
external usenet poster
 
Posts: 133
Default 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  
Old January 24th, 2009, 01:09 AM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old January 24th, 2009, 01:40 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old January 24th, 2009, 02:32 PM posted to microsoft.public.access.tablesdbdesign
Rick Brandt
external usenet poster
 
Posts: 4,354
Default 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  
Old January 25th, 2009, 06:14 PM posted to microsoft.public.access.tablesdbdesign
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default 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  
Old January 26th, 2009, 01:46 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old January 26th, 2009, 02:44 AM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.