change the way percentages apprear

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I enter percentages it shows like this
I enter 4
it appears 400.00%
I want it to show 4% or even 4.00%

I know this seems simplistic but I an having a difficult time with this!
Thanks
 
You should enter .04 for 4 percent since all whole numbers greater than 1
are greater than 100%.

An alternative is use the after update event of the text box to check the
value to see if a higher number is entered and divide the number by 100.

Private Sub txtMyPct_AfterUpdate()
If Me.txtMyPct > 1 Then
Me.txtMyPct = Me.txtMyPct / 100
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top