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

Format does not work

Status
Not open for further replies.

demoman

Programmer
Oct 24, 2001
242
US
Howdy - I cannot get the 2 format functions (below) to work. Any ideas?

strSQLCmd = "Select sum(OrigAmount) as OrigAmt, sum(CreditAmount) as credamt, sum(Amount) as balance, sum(retainage) as retainage " & _
"from ARData where PM = " & "'" & cboPM.Text & "'"

rsTotals.Open strSQLCmd, cnAR, adOpenStatic, adLockOptimistic, adCmdText

With rsTotals
txtOriginal.Text = Str(Format(!origamt, "##,###,###.00"))
txtCredit.Text = Str(Format(!credamt, "##,###,###.00"))
txtRetainage.Text = Str(!retainage)
txtBalance.Text = Str(!balance)
End With

All I get is the unformatted data value.

Thanks
 
Never ran into this problem. Maybe try populating the textbox first then format the textbox.

chadt@techtnologies.com
 
Yes Chadt - that does the trick! Perhaps this was just one of those things you expect to work, but doens't.

Cheers
 
Hi,

format is the property of text box. and u r trying to set the format of the recordset object which it doesn't have. 1st retreive the data in the text box. and 2nd set the format property of the text box.

Bye,

adnan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top