Hi there!
I'm having problem when requerying my main form of my application.
Here's the story...
I open a pop-up form using my main form to edit some values. When I return to my main form after requerying the dataset (to update the fields to the new values) I want to return the the record I was at before requerying...
In its basic sense, my code is this:
================================================== ==
Public Function frm_requery(f As Form)
Dim varbookmark As Variant
varbookmark = f.Bookmark
f.Requery
f.Bookmark = bm
================================================== ==
As you can see, I set the bookmark before requerying, requery the data, then I go back to the bookmark.
I've figured out that the problem occurs because the records in the form (it's an ADO recordset btw) haven't finished loading by the time the pointer is set to the bookmark, so for lower records in the recordset this works fine but for later records I get the dreaded '2757' error. If I click 'Debug' and then click the 'Play' button to resume the code, the code works fine.
Basically, is there any way that I can check to see whether the records in the form have fully loaded before I try to go to the bookmark?
Many thanks for any help you can give as I'm currently tearing my hair out over this.
Paul