WordTechinc
Programmer
- Sep 4, 2009
- 38
I am try to update seleted check box but it takes so long to save into table. There are only 5,000 records in table.
Is there way to make this faster?
Here is code;
Sub SaveCurrentCheckBox()
Static blnSelect As Boolean
Set db = CurrentDb()
Set myrs = Me.RecordsetClone
With myrs
While Not .EOF
.Edit
If !NCselect = True Then
!NCselect = True
End If
If !NCselect = False Then
!NCselect = False
End If
.Update
.MoveNext
Wend
.Close
End With
myrs.MoveFirst
Me.Requery
End Sub
Is there way to make this faster?
Here is code;
Sub SaveCurrentCheckBox()
Static blnSelect As Boolean
Set db = CurrentDb()
Set myrs = Me.RecordsetClone
With myrs
While Not .EOF
.Edit
If !NCselect = True Then
!NCselect = True
End If
If !NCselect = False Then
!NCselect = False
End If
.Update
.MoveNext
Wend
.Close
End With
myrs.MoveFirst
Me.Requery
End Sub