|
-
Aug 17th, 2000, 07:12 AM
#1
Thread Starter
Lively Member
Hi everyone,
I want to format a column in to currency in msh flexgrid control. After spending a whole day, I still can not find out how.
Pls, give me some idea.
Thank you.
sincerely,
Rathi
-
Aug 21st, 2000, 09:40 AM
#2
PowerPoster
Is it possible to store the values as currency prior to loading them in grid? If so,store then display. If not, try masked-edit box set to currency.
Just a thought.
-
Aug 21st, 2000, 10:15 AM
#3
PowerPoster
Me again. I tries it my program and it works. Let me know if this helps:
MyData _
= rst!ROWNO _
& vbTab & rst!IDNumber _
& vbTab & rst!Class _
& vbTab & Format(rst!Wage, "currency") _
& vbTab & Format(rst!PayST, "currency") _
& vbTab & Format(rst!PayOT, "currency") _
& vbTab & Format(rst!PayDT, "currency") _
& vbTab & Format(rst!DeductST, "currency") _
& vbTab & Format(rst!DeductOT, "currency") _
& vbTab & Format(rst!DeductDT, "currency") _
MSFlexGrid1.AddItem MyData
Refresh
Of course, I am pulling info from a database so this may have to be customized for your program. Good Luck.
-
Aug 23rd, 2000, 04:20 AM
#4
Thread Starter
Lively Member
Originally posted by James Stanich
Me again. I tries it my program and it works. Let me know if this helps:
MyData _
= rst!ROWNO _
& vbTab & rst!IDNumber _
& vbTab & rst!Class _
& vbTab & Format(rst!Wage, "currency") _
& vbTab & Format(rst!PayST, "currency") _
& vbTab & Format(rst!PayOT, "currency") _
& vbTab & Format(rst!PayDT, "currency") _
& vbTab & Format(rst!DeductST, "currency") _
& vbTab & Format(rst!DeductOT, "currency") _
& vbTab & Format(rst!DeductDT, "currency") _
MSFlexGrid1.AddItem MyData
Refresh
Of course, I am pulling info from a database so this may have to be customized for your program. Good Luck.
Hi James,
Thank you very much for your time and support.
I use this code, to format all the cells in 9th column to
currency.
Private Sub Format()
Dim rows as integer
dim i as integer
rows = val(MSHFlexgrid1.Rows -1)
For i = 1 to rows
MSHFlexgrid1.Col = 9
MSHFlexgrid1.Row = i
MSHFlexgrid1.Text = Formatcurrency(MSHFlexgrid1.Text)
Next i
End sub
==========
Any comments?
sincerely,
Rathi
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
|