2楼,你的方法我试了,还是不行,请你看一下代码,顺便提醒一下,MemberCardNo和contacter的数据类型是varchar,但TotalAmount的类型为decimal,
For i = 0 To Adodc1.Recordset.Fields.Count - 1
objDataSource.Fields.Append Adodc1.Recordset.Fields(i).Name, _
Adodc1.Recordset.Fields(i).Type, _
Adodc1.Recordset.Fields(i).DefinedSize, _
adFldIsNullable
Next
Dim T1 as Decimal, T2 as Decimal, T3 as Decimal, T4 as Decimal
T1 = CDec(Text1.Text)
T2 = CDec(Text2.Text)
T3 = CDec(Text3.Text)
T4 = (T1 - T2) / 2 - T3
Text4.Text = CStr(T4)