Error 3021 "No Current Record"

R

RM Ashraf

Hi
I am having a real hard time with access weared errors. I am using following
code:

Me.HistorySymptoms.Form.Refresh 'Just to make sure. It was a try because
of error
If Me.HistorySymptomTab.Visible = True Then 'It is a subform in a tab page
For counter = 0 To 29 'Number of fields in the recordset
If IsNull(rs.Fields(1 + counter).value) = False Then ' Just to
check Null values
MsgBox rs.Fields(counter).Name 'For debugging
Old_History(counter) = rs.Fields(1 + counter).value 'This
line has problem
End If
MsgBox rs.Fields(counter).Name & " Done.||" & counter
Next counter
End If

The error comes in the maked line on accessing the field value. Previously I
had another error but after going through the process of "Corrupt Access file
correction", I am getting this one. My form has subforms in tabpages. I want
to save all the field values to the array on pressing a button. Button is
part of the main form and code copies values from a subform. I don't think my
file is corrupt as I went through the process twice :-(
Looking for help
RMA
 
Top