我有这样一段源码:
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenStatic
rst.LockType = adLockOptimistic
rst.Open "Select * from 班组"
zqs = rst.RecordCount
aa = 0
rst.MoveLast
If rst!组12 = "否" Then
bb(1) = rst!组12连出空
rst.MoveLast
Else
Do Until rst!组12 = "否"
rst.MovePrevious
Loop
bb(1) = rst!组12连出空
rst.MoveLast
End If
......
rst.Close
Set rst = Nothing
End Sub
由于字段“组12、组13、..有十来个之多,为了程序的简洁想把’rst!组12‘中的“组12”等多个字段用数组a(n)替代,用循环语句来替代一个个的填写,但直接使用“rst!& a(n)= '否'"显然不行。请教应该怎样写才有效。