E
Emma
I have a form which lists all of my records with a
checkbox next to them for selecting. At the top of the
form is a box, ckPacifiCorp, which should select all
records with a PacifiCorp as the "Contact Type" for the
user. However, it seems to only look at the Contact Type
for the first record and then select or not select all
records based on that one record's field. It doesn't seem
to be moving to the next record. Could anyone help?
Here's the code I'm using:
Dim rs As Recordset
Me.Refresh
Set rs = Me.RecordsetClone
If rs.RecordCount > 0 Then
rs.MoveFirst
Do Until rs.EOF
rs.Edit
If [ContactType].Value = "PacifiCorp"
Then rs!PrintFlag = (Me!ckPacifiCorp = True)
rs.Update
rs.MoveNext
Loop
End If
Me.Refresh
TIA!
checkbox next to them for selecting. At the top of the
form is a box, ckPacifiCorp, which should select all
records with a PacifiCorp as the "Contact Type" for the
user. However, it seems to only look at the Contact Type
for the first record and then select or not select all
records based on that one record's field. It doesn't seem
to be moving to the next record. Could anyone help?
Here's the code I'm using:
Dim rs As Recordset
Me.Refresh
Set rs = Me.RecordsetClone
If rs.RecordCount > 0 Then
rs.MoveFirst
Do Until rs.EOF
rs.Edit
If [ContactType].Value = "PacifiCorp"
Then rs!PrintFlag = (Me!ckPacifiCorp = True)
rs.Update
rs.MoveNext
Loop
End If
Me.Refresh
TIA!