G
Guest
I'm trying to populate a table with a nested loop, but nothing happens when I
run it. What's wrong with this picture? (Let me know if the following code
is not self-explanatory.) Thanks for your help.
Function FillLink()
Dim D, Q As Single
Set db = CurrentDb
Set rs = db.OpenRecordset("Dept-Question Link Table")
For D = 1 To 40
For Q = 1 To 96
rs.AddNew
rs!LD_Num = D
rs!LQ_Num = Q
Next Q
Next D
rs.Close
End Function
run it. What's wrong with this picture? (Let me know if the following code
is not self-explanatory.) Thanks for your help.
Function FillLink()
Dim D, Q As Single
Set db = CurrentDb
Set rs = db.OpenRecordset("Dept-Question Link Table")
For D = 1 To 40
For Q = 1 To 96
rs.AddNew
rs!LD_Num = D
rs!LQ_Num = Q
Next Q
Next D
rs.Close
End Function