一个用变量控制循环的问题
我的程序中间有一段需要循环If Combo1.Text <> "" And Combo2.Text <> "" And Combo3.Text <> "" Then
Dim rs1 As New ADODB.Recordset
Set rs1 = New ADODB.Recordset
rs1.Open "Select * from " + Combo11.Text + " where age = " + Trim(Trim(Text11.Text)) + " and sex = '" + Combo12.Text + "' and year = " + Trim(Trim(Combo13.Text)) + "", cn, adOpenKeyset, adLockPessimistic
Text1.Text = rs1.Fields(5) * Text12.Text
rs1.Close
Set rs1 = Nothing
Else: Text13.Text = 0
End If
我循环的时候 需要更改Combo控件
第一次循环用Combo11 Combo12 Combo13 text11 text12 text12
第二次循环用Combo21 Combo22 Combo23 text21 text22 text22
想使用Combo+变量+1这样控制 不知道能不能实现