没想到这个问题,没人帮我解决,不过还是我自己解决了,拿出来和大家一起共享。
txtstr = Text1.Text
str = "select a.htid,a.qyid,a.fid,a.xm,a.qzrq,a.zzrq,a.zj,a.zlbzj,a.zfbzj,a.hj,a.dz,a.dh,a.jmsfz,a.qdrq,a.zf,b.zf,c.zf,a.fkrq,b.fkrq,c.fkrq
from htcx_view a,htcx_view b,htcx_view c
where a.htid='" & txtstr & "' and a.htid=b.htid and b.htid=c.htid and (cint(a.qh)=1 and cint(b.qh)=2 and Cint(c.qh)=3) order by a.htid"
DataEnv.Commands(3).CommandText = str
htcxDataRpt.Show
Set DataEnv = Nothing
str的值是查询条件,根据str的值,查出记录,然后打印。
txtstr = Text1.Text
str = "select a.htid,a.qyid,a.fid,a.xm,a.qzrq,a.zzrq,a.zj,a.zlbzj,a.zfbzj,a.hj,a.dz,a.dh,a.jmsfz,a.qdrq,a.zf,b.zf,c.zf,a.fkrq,b.fkrq,c.fkrq
from htcx_view a,htcx_view b,htcx_view c
where a.htid='" & txtstr & "' and a.htid=b.htid and b.htid=c.htid and (cint(a.qh)=1 and cint(b.qh)=2 and Cint(c.qh)=3) order by a.htid"
DataEnv.Commands(3).CommandText = str
htcxDataRpt.Show
Set DataEnv = Nothing
str的值是查询条件,根据str的值,查出记录,然后打印。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货