![]() |
#2
vbvcr512013-11-13 18:01
|

dim i as integer
dim nn as integer
for i=1 to 6
for nn=78 to 83
Adodc13.RecordSource ="""" & "select * from Downpart where [group] like 'S" & i & "%' and [Detail] like '" & label11(35).caption & "'" & """"
adodc13.refresh
label11(nn).caption=adodc13.recordset.recordcount
next nn
next i
这句话怎么纠正,先说明一下i是变量dim nn as integer
for i=1 to 6
for nn=78 to 83
Adodc13.RecordSource ="""" & "select * from Downpart where [group] like 'S" & i & "%' and [Detail] like '" & label11(35).caption & "'" & """"
adodc13.refresh
label11(nn).caption=adodc13.recordset.recordcount
next nn
next i
我用msgbox的结果为:
"select * from Downpart where [group] like 'S7%' and [Detail] like 'AE connector card'"
这个结果是我想要的,但是在
Adodc13.RecordSource ="""" & "select * from Downpart where [group] like 'S" & i & "%' and [Detail] like '" & label11(35).caption & "'" & """"
为什么会不通过呢,请各位帮忙指正,谢谢!