[求助]如何结束循环
Function BillDefaultTemplate(Windowid)strsql1="select isdefault from pub_p_template where windowid='"&windowid&"'"
set rd=DataAcess.getrecordlist2(strsql1)
dim j
while not rd.eof
if rd.field(0).value=1 then
StrSql="Select * from Pub_p_templated where Templateid in (Select templateid from Pub_P_template where isdefault=1 Windowid='"&windowid&"') order by sequence"
我想在这里加结束循环的语句,该怎么加???
else
StrSql="Select * from Pub_p_templated where Templateid in (Select templateid from Pub_P_template where issystem=1 Windowid='"&windowid&"') order by sequence"
end if
rd.movenext
end while
Set BillDefaultTemplate=DataAccess.GetRecordlist2(Strsql)
End Function