| 发表于:2007-12-13 21:04:063楼 得分:0 |
好像不可以。 下面为我的代码: '========================================== option explicit 'dim rstdh_codedict as adodb.recordset dim rstfind as adodb.recordset dim rstfind2 as adodb.recordset dim temp1 as adodb.recordset public main_ztname as string public main_path as string public gcomputername as string public mycon as adodb.connection private sub command1_click() main_path = app.path main_ztname = main_path & "\mydb.mdb" set mycon = new adodb.connection mycon.cursorlocation = aduseclient mycon.open "provider=microsoft.jet.oledb.4.0;data source=" & main_ztname & ";jet oledb:database password=828" set rstfind = new adodb.recordset set rstfind2 = new adodb.recordset '暂停 rstfind.open "select id,krz_id,xm,rq,jfje,dfje into temp1 from krmxz", mycon, adopenstatic, adlockreadonly '暂停 rstfind2.open "select id,krxm,krda_id from krz", mycon, adopenstatic, adlockreadonly '暂停 rstfind2.open "select id,krxm,krda_id update temp1 from krz", mycon, adopenstatic, adlockreadonly rstfind2.open "select * from krz inner join krmxz on krz.id =krmxz.id", mycon, adopenstatic, adlockreadonly rstfind.open "select * from krmxz", mycon, adopenstatic, adlockreadonly reportmod.sections(3).controls("text2").datafield = "dfje" reportmod.sections(3).controls("text2").visible = true reportmod.sections(3).controls("text1").datafield = "krxm" reportmod.sections(3).controls("text1").visible = true reportmod.sections(3).controls("text3").datafield = "fh" reportmod.sections(3).controls("text3").visible = true reportmod.sections(3).controls("text4").datafield = "rq" reportmod.sections(3).controls("text4").visible = true set reportmod.datasource = rstfind reportmod.show'显示报表窗体 end sub '========================================== 看能不能帮我改改代码,谢谢。 | | |
|