D
Dave Bradshaw
I have a form with a subform that shows records in a continuous form.
By the side of the record on the subform is a button which the user
can click to modify the record. So the display on the subform is a
table of records, with a button beside each record.
The button works fine except in one instance. The problem is when the
user clicks on the button for the first record on the subform (and it
carries out its actions) and another record is selected on the master
form, and the records on the subform are changed. If the user again
clicks the button for the first record on the subform (as it is
ordered on the subform), a "Run-time error '3021' No current record."
error is generated. But if the user clicks on the button for the
second record, no error is generated. If the user clicks into another
record and then back into the original record, the button works OK,
and it works OK if the second or subsequent records are repeated.
I can't understand why Access does not see the first record as being
the current record, unless the cursor is moved from another record.
Can anyone explain this behaviour, or at least give me a work around?
Thank you
By the side of the record on the subform is a button which the user
can click to modify the record. So the display on the subform is a
table of records, with a button beside each record.
The button works fine except in one instance. The problem is when the
user clicks on the button for the first record on the subform (and it
carries out its actions) and another record is selected on the master
form, and the records on the subform are changed. If the user again
clicks the button for the first record on the subform (as it is
ordered on the subform), a "Run-time error '3021' No current record."
error is generated. But if the user clicks on the button for the
second record, no error is generated. If the user clicks into another
record and then back into the original record, the button works OK,
and it works OK if the second or subsequent records are repeated.
I can't understand why Access does not see the first record as being
the current record, unless the cursor is moved from another record.
Can anyone explain this behaviour, or at least give me a work around?
Thank you