|
-
Sep 28th, 2002, 02:11 PM
#1
Thread Starter
Hyperactive Member
How do i make it to % it.
how do i make mt textbox display a percentage of a text value?
say i have a database (flexgrid) i want a text box to display a 75% of a col value, a numeric value.
example code.
msflexgrid1.col = 2
text1.text = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2)
Ok that puts up the current number value of col 2 and selected row into the textbox.
but how do i make it only 75% of that value. i tried:
msflexgrid1.col = 2
text1.text = 75% of (MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2))
but it didn't work.
Please help me.
-
Sep 28th, 2002, 02:16 PM
#2
Need-a-life Member
Try:
VB Code:
Text1.Text = .75 * (MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2))
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Sep 28th, 2002, 02:19 PM
#3
Thread Starter
Hyperactive Member
kool thanks mate that worked.
-
Sep 28th, 2002, 02:21 PM
#4
-
Sep 28th, 2002, 07:51 PM
#5
PowerPoster
Originally posted by Mc Brain
Try:
VB Code:
Text1.Text = .75 * (MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2))
I would do it this way :
VB Code:
Text1.Text = round(.75 * cdbl((MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2))),2)
This is just my preference...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|