以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  字符窜连接问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=2581)

--  作者:狐哥
--  发布时间:2009/4/23 17:56:00
--  字符窜连接问题
各位老师帮看看:

Dim T1,T2,T3 As Double
    dim ta,tb,tc as string
    T1 = tables("收据明细").Compute("Sum(金额)","币制 = \'USD\'")
    T2 = tables("收据明细").Compute("Sum(金额)","币制 = \'RMB\'")
    T3 = tables("收据明细").Compute("Sum(金额)","币制 = \'HKD\'")
    if t1 > 0 then
        ta = "USD:" & format(T1,"#.00")
    end if
    if t2 > 0 then
        tb = "RMB:" & format(T2,"#.00")
    end if
    if t3 > 0 then
        tc = "HKD:" & format(T3,"#.00")
    end if
    rs.Text = "TOTAL: " & ta & "   " & tb & "   " & tc

显示的结果是对的,但系统说TA在赋值前被使用.哪如何更改如上代码呢.
--  作者:狐狸爸爸
--  发布时间:2009/4/23 18:02:00
--  
 dim ta as string = ""
 dim tb as string = ""
 dim tc as string = ""
--  作者:狐哥
--  发布时间:2009/4/23 18:08:00
--  
呀,不可以统计设置的吗,呵呵.