Hi Guys,
Im v new to VBA and been having trouble getting the following code to loop through the records in my subform:
Private Sub cmdComplete_Call_Click()
Dim rs As dao.Recordset
Set rs = Me.fsub_Call_Off_Quantities.Form.RecordsetClone
rs.MoveFirst
Do Until rs.EOF
[fsub_Call_Off_Quantities].Form![txtQuantity_Called_Off] = [fsub_Call_Off_Quantities].Form![Quantity]
rs.MoveNext
Loop
End Sub
It only seems to update the first records txtQuantity_Called_Off value. I have tried all the 'looping' code variations i can find and they all seem to only update the first :banghead:
Please can someone point out where im going wrong ?!
Thanks in advanced
J
Im v new to VBA and been having trouble getting the following code to loop through the records in my subform:
Private Sub cmdComplete_Call_Click()
Dim rs As dao.Recordset
Set rs = Me.fsub_Call_Off_Quantities.Form.RecordsetClone
rs.MoveFirst
Do Until rs.EOF
[fsub_Call_Off_Quantities].Form![txtQuantity_Called_Off] = [fsub_Call_Off_Quantities].Form![Quantity]
rs.MoveNext
Loop
End Sub
It only seems to update the first records txtQuantity_Called_Off value. I have tried all the 'looping' code variations i can find and they all seem to only update the first :banghead:
Please can someone point out where im going wrong ?!
Thanks in advanced
J