A
Andy Korth
Well, I liked that code that Elwin and Andy Cole wrote
for me so much that i decided to use it in a couple other
places.
I want to do some recordset stuff with a subform, but I
get an error saying the form cannot be found.
Set rst = Forms![Plots by Operation
subform].RecordsetClone
is the line that gives the error.
In another situation, I have this working code:
Set rst = Me.RecordsetClone
The form name is spelled correctly. Is the problem
occuring because the form is already open as a subform in
the form that is calling this command?
If not, how can I accomplish this? (full code is below)
Thanks in advance,
Andy
Dim arrPlots(194) As Integer
Dim CountedRecs As Integer
Dim rst As DAO.Recordset
Dim intI As Integer
Set rst = Forms![Plots by Operation
subform].RecordsetClone 'error...
With rst
.MoveLast
.MoveFirst
CountedRecs = .RecordCount
For intI = 1 To CountedRecs
arrPlots(intI - 1) = ![Plot]
.MoveNext
Next intI
End With
rst.Close
Set rst2 = Nothing
for me so much that i decided to use it in a couple other
places.
I want to do some recordset stuff with a subform, but I
get an error saying the form cannot be found.
Set rst = Forms![Plots by Operation
subform].RecordsetClone
is the line that gives the error.
In another situation, I have this working code:
Set rst = Me.RecordsetClone
The form name is spelled correctly. Is the problem
occuring because the form is already open as a subform in
the form that is calling this command?
If not, how can I accomplish this? (full code is below)
Thanks in advance,
Andy
Dim arrPlots(194) As Integer
Dim CountedRecs As Integer
Dim rst As DAO.Recordset
Dim intI As Integer
Set rst = Forms![Plots by Operation
subform].RecordsetClone 'error...
With rst
.MoveLast
.MoveFirst
CountedRecs = .RecordCount
For intI = 1 To CountedRecs
arrPlots(intI - 1) = ![Plot]
.MoveNext
Next intI
End With
rst.Close
Set rst2 = Nothing