B
bhammer
Access2003
A cmdCheckAll button is supposed to put checks in all the checkboxes of the
records visible (with filter, too, if applied) on a subform. I have this
working, but because the OnCurrent event of the subform loads a corresponding
path of a JPG image, the execution takes a while to go through all the
records, pausing slightly to load the image. I don't care to see the image,
just to check all the boxes. So I simply changed the Recordset to a
RecordsetClone but it won't work. Why?
Here's my code:
-----------------------------
Private Sub cmdCheckAll_Click()
DoCmd.OpenForm "mbxPleaseWait"
DoEvents
Application.Echo False
DoCmd.Hourglass True
With Me.Parent.frmDefectListRight.Form.RecordsetClone
.MoveFirst
Do While Not .EOF
Me.Parent.frmDefectListRight.Form.chkIllust = -1
.MoveNext
Loop
End With
Application.Echo True
DoCmd.Hourglass False
DoCmd.Close acForm, "mbxPleaseWait"
End Sub
----------------------------------------------
A cmdCheckAll button is supposed to put checks in all the checkboxes of the
records visible (with filter, too, if applied) on a subform. I have this
working, but because the OnCurrent event of the subform loads a corresponding
path of a JPG image, the execution takes a while to go through all the
records, pausing slightly to load the image. I don't care to see the image,
just to check all the boxes. So I simply changed the Recordset to a
RecordsetClone but it won't work. Why?
Here's my code:
-----------------------------
Private Sub cmdCheckAll_Click()
DoCmd.OpenForm "mbxPleaseWait"
DoEvents
Application.Echo False
DoCmd.Hourglass True
With Me.Parent.frmDefectListRight.Form.RecordsetClone
.MoveFirst
Do While Not .EOF
Me.Parent.frmDefectListRight.Form.chkIllust = -1
.MoveNext
Loop
End With
Application.Echo True
DoCmd.Hourglass False
DoCmd.Close acForm, "mbxPleaseWait"
End Sub
----------------------------------------------