J
James
I'm trying to run through a recordset (rs) and create a new one
(OfferingsDuplicate) off of that one. It errors out on the .AddNew with
error "Operation is not allowed when the object is closed"
Here's my code:
Set DuplicateOfferings = New Recordset
Do While Not rs.EOF
If Not IsNull(rs.Fields("Link")) Then
If rs.Fields("Link") <> "" Then
If rs.Fields("Link") <> 0 Then
DO_Link = rs.Fields("Link")
With DuplicateOfferings
.AddNew (DO_Link)
.update
End With
DO_OfferingID = rs.Fields("OfferingID")
With DuplicateOfferings
.AddNew (DO_OfferingID)
.update
End With
End If
End If
End If
rs.MoveNext
Loop
Thanks!
(OfferingsDuplicate) off of that one. It errors out on the .AddNew with
error "Operation is not allowed when the object is closed"
Here's my code:
Set DuplicateOfferings = New Recordset
Do While Not rs.EOF
If Not IsNull(rs.Fields("Link")) Then
If rs.Fields("Link") <> "" Then
If rs.Fields("Link") <> 0 Then
DO_Link = rs.Fields("Link")
With DuplicateOfferings
.AddNew (DO_Link)
.update
End With
DO_OfferingID = rs.Fields("OfferingID")
With DuplicateOfferings
.AddNew (DO_OfferingID)
.update
End With
End If
End If
End If
rs.MoveNext
Loop
Thanks!