Get Error 3021 on subform reference to recordset, only with refres

G

Greg A

Private Sub Command1_Click()

Dim rst As Recordset
Dim fieldData As Long

'This is a simple form with one subform qryTable1
'Press the Refresh button then initiate this sub results in Error 3021
'Select another record on the form before initiating this sub and there is
no error

Set rst = Me.qryTable1.Form.Recordset
fieldData = rst.Fields(0) 'Debug line references here for error 3021

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top