D
David Anderson
I am hitting an unexpected problem with the following code in a subform. It
works fine for some main form records but the storing of the bookmark causes
Error 3021 (No current record) for other records.
Set rst = Me.RecordsetClone
With rst
If Me.RecordsetClone.RecordCount = 0 Then
GoTo MyLabel_999
End If
If Me.NewRecord = True Then
Me.Bookmark = varBookmark
GoTo Exit_Form_Current
Else
'Following line sometimes triggers Error 3021 - 'No current
record' varBookmark = .Bookmark
End If
End With
works fine for some main form records but the storing of the bookmark causes
Error 3021 (No current record) for other records.
Set rst = Me.RecordsetClone
With rst
If Me.RecordsetClone.RecordCount = 0 Then
GoTo MyLabel_999
End If
If Me.NewRecord = True Then
Me.Bookmark = varBookmark
GoTo Exit_Form_Current
Else
'Following line sometimes triggers Error 3021 - 'No current
record' varBookmark = .Bookmark
End If
End With