473,473 Members | 1,672 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

formatting numbers with percent

21 New Member
Hi, ok, I got 2 questions, I have a progress bar in access, along with the progress bar there is a percentage display label called lblFramePercent wich shows me the percentage completion, also I d my declared percComplete as single for showing me only entire numbers, but I defined perc complete like this

Me.lblFrameProgress.Caption = PercComplete * 100 & "%" & "Completed!"

Now it shows me 16.00125%, for example...
I tried.
percComplete =Format(lblFramePercent, "%%%.%")

but it didn't worked out

1. I wanna format my percentage display to only full integers, no decimal places, like 10%,11%,12%, etc.

2. Also Im curious to know how will it be if it has only one decimal space displaying, like, 10.1%,10.5%, etc.
Jul 6 '16 #1
1 1042
CVAR
21 New Member
I found the solution!

1. FormatPercent(PercComplete, 0) & " " & "Completed", this will give me:
(i,e 18% Completed", 19% Completed, etc.

2. FormatPercent(PercComplete, 1) & " " & "Completed", this will give me:
(i,e 18.0% Completed", 19.2% Completed, etc.
Jul 6 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Stian | last post by:
Hi, I'm sort of new to Python and I've just discovered the amazing formatting using the % operator. One thing I can't figure out is how to format numbers so that they get leading zeros, for example...
6
by: David Sharp | last post by:
Once I've converted my floats to chars using STR, is there an easy way to put commas in separating the thousands. i.e. convert 53000000.12 to 53,000,000.12 I'm thinking I'll have to do it...
3
by: cody | last post by:
How can I format numbers with leading zeros? I believe I did this before some time ago but I cannot remember how I did it. I want the output be 100305 for 10:03:05. string fname =...
4
by: John Sutor | last post by:
I need some code that, on each keyup event, will take all of the numbers typed into the text box and format as they type to look like this 100 1,000 10,000 100,000 1,000,000 John S
9
by: Markus | last post by:
Hi all, two questions on formatting numbers: - Given is a decimal/money datatype in SQL-Server, e.g. decimal(9,4), thus displaying a value like 13.2000 How can I prevent to display the...
17
by: scan87 | last post by:
Can somone please, please give me the solution for the following problem. I need to submit it on Monday. Write a global function called format, which formats numbers with a given number of decimal...
2
by: freemld10 | last post by:
Hi guys, Can someone please help me to Format Numbers with commas. The script below have very large number without commas. To read numbers in trillions and billions are hard, without commas to...
3
by: Nathan Sokalski | last post by:
I am using databinding to populate a dropdownlist with numeric values. Some of the values have more decimal places than others, and I only want the minimal number of decimal places necessary...
3
by: sparks | last post by:
We have one database that they are constantly reformatting their inputs. I asked about the changes and they can never get the same types of numbers from the people. some are -.95 and later they...
13
by: cj2 | last post by:
pages = 1 pages.tostring gives me "1" pages+1.tostring gives me "2.0" Why did it add the ".0" on there? I was looking for "2" and this screws me up. Actually this is what I was doing. In...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.