As in the title I cam across a strange phenomenon. I have a form which contains two subforms. On both subforms I have a button which triggers requery of the relevant subform. If after loading the form, I immediately click on this button (requery the form) I get error "3021: No current record" when I try to save the value of the primary key of the current record in the OnCurrent event to a variable. Strangely enough in the debugger the relevant values are like this:
Form.CurrentRecord=1
Form.RecordSet.Absoluteposition=-1
Form.RecordSet.RecordCount=14
Form.RecordSet.EOF=False
Form.RecordSet.BOF=False
Also note, that when the form is loaded, in the load event it still works correctly and the there I can save the primary key value which is the primary key contained in the first record.
Somewhere between Form_Load and me clicking that requery button the status of the form is getting out of synch. I just recently switched from Access 2003 to 2007 and as far as I can remember this error did not happen before (although I might just not click this button right afer load).
For now I have a workaround, but I'd really like to understand how this can happen.