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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem to display the total value (taken from datagrid) as Currency.

Status
Not open for further replies.

awinnn

MIS
Jul 21, 2003
166
0
0
MY
Hi,
I'm having problem to display the grand total as a Currency format. The value is taken from the datagrid. This is what i've done..

Code:
Set rsgtot = New ADODB.Recordset
rsgtot.Open "SELECT Sum (price * pt) AS [GrandTotal] FROM 
            [Order Details] where SN=" & "'" & txtFields
            (0).Text & "'" & "group by SN", db
txtgtotal.Text = FormatCurrency(rsgtot!grandtotal)

My problem is, it's not working. The value should be displayed as a Currency format.
Any idea? Thanx in advance..:)
 
what happens if you use
txtgtotal.Text = Format(rsgtot.fields("grandtotal").value,"Currency")

?

Hope I've been helpful,
Wayne Francis

If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top