yepwingtim
Registered User.
- Local time
- Today, 09:12
- Joined
- Jun 6, 2008
- Messages
- 126
Private Sub Text8_AfterUpdate()
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.MoveFirst
Do While Not (rst.BOF Or rst.EOF)
rst.Edit
rst![Run] = IIf(Me.checkbox = True, "1", "2")
rst.Update
rst.MoveNext
Loop
Me.Requery
Set rst = Nothing
End Sub
It reads the selected checkbox and gives all the record values as 1 if TRUE - vice-versa
I want it to be displayed according the checkbox
(checked means 1, unchecked means 2)
but it is just giving me a number that is either all 1's or all 2's in all the records
am i doing this loop wrong?
thanks
________
Hero honda hunk specifications
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.MoveFirst
Do While Not (rst.BOF Or rst.EOF)
rst.Edit
rst![Run] = IIf(Me.checkbox = True, "1", "2")
rst.Update
rst.MoveNext
Loop
Me.Requery
Set rst = Nothing
End Sub
It reads the selected checkbox and gives all the record values as 1 if TRUE - vice-versa
I want it to be displayed according the checkbox
(checked means 1, unchecked means 2)
but it is just giving me a number that is either all 1's or all 2's in all the records
am i doing this loop wrong?
thanks
________
Hero honda hunk specifications
Last edited: