I ended up fixing this with the following code,
Dim correctRecord as string
correctRecord = Me.mySubForm.Form.currentRecord
Me.mySubForm.Form.Recordset.MoveFirst
Me.mySubForm.Form.Recordset.Move (correctRecord - 1)
It worked, but the fact that Access seems to forget the currentRecord
is still a mystery to me.
Mark
On Jul 12, 1:29 pm, mark_aok <mark_...@hotmail.comwrote:
Quote:
Hi all,
>
I have a form with a subform called "mySubForm" (the subform is always
in datasheet view), and I have a button labeled "return item". When
users click return item, it finds the record from the datasheet, and
it modifies some fields.
>
The problem is, I am randomly getting an error saying "no current
record". When I check
me.mySubForm.form.currentRecord, it shows a perfectly valid
currentRecord value. But when I look at the actual recordset
(me.mySubForm.recordset), it says that there is no currentRecord.
>
Anyone have any idea what's going on?
>
P.S I haven't been able to determine why this occurs randomly.
Everyone once in a while, it just looses the currentRecord.
>
Thanks