Hi folks,
Ive got three textbox's and a command button what I am trying to do and failing is place a figure in one box(total) and a figure in another(sold) and the third gives you the Percentage of what has been sold.
Thanks
Spud
Printable View
Hi folks,
Ive got three textbox's and a command button what I am trying to do and failing is place a figure in one box(total) and a figure in another(sold) and the third gives you the Percentage of what has been sold.
Thanks
Spud
Should be easy
Code:Text3=Val(Text1)/Val(text2)*100 & "%"
Cheers Kedaman that does the trick! Thanks
How do I reduce the number of decimals after the point
Thanks again!
Spud
Excelent Kedaman,
Thanks again, before I put you up there in a god like status I posted a question on the database forum two days ago there dosn't seem to be much movement in that department. Would you mind having a look as I see that you answer a lot of posts just to confirm that your status is a guru and not a god?
Cheers Again
Spud
(I did answer a post once, a very simple question I think it was What does VB stand for?)
Aw, that was Meg, but he's a Guru too, but don't expect me to go in the database forum because i'm not a databaseguru
You should also be able to use the 'Format' function. It will allow you to specify exactly how you want you result to look like.
I agree, the format option is probably better because then you can have it look the "right" way. For example, if the value in one instance was one and one-tenth percent it would be displayed as 1.1% If the value was one and fifteen-hundreths percent it would be displayed as 1.15%. If you used the Format(myval, "0.00%") command the two would be respectively displayed as:
1.10%
1.15%
A cleaner look.
My mistake Kedaman & Megatron it late at night when I post, the old eyes aren't as good as they used to be.
Thanks to both.
Spud