Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSFlexGrid.TextMatrix problem

Status
Not open for further replies.

sccenterprises

Programmer
Apr 4, 2005
6
US
When I use the following I get a 2 that comes back instead of 2,460 that is in the msflexgrid.

val(msflexgrid1.textmatrix(x,13))

The field has 2460 but this value shows up as a 2. My guess is because of the comma, but I don't know what to do to get around it. I have tried the following but it comes back the same.

format(val(msflexgrid1.textmatrix(x,13)),"##,##0.00
 
The val function will fail when it hits the comma (','). Try using another conversion function such as CInt or CLng.

zemp
 
zemp thanks I took the val( off and the ) off the end and it worked fine.

Thanks
 
For currecny values you can also use the 'formatcurrency' function. This uses the local windows currency formats.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top