Solved Requery underlying form, but retain bookmark (1 Viewer)

You have a habit of telling me that I am not seeing what I clearly am seeing. You are wrong - I have single-stepped through code that does a requery and the bookmark DID work afterwards. Sometimes.

Again, I have no idea what is in a bookmark, but since it is only a two-character string, it cannot be a very sophisticated construct, and it is not a big surprise that it would sometimes match.

If you have no idea what is in a bookmark, here is a partial answer.


In the "Remarks" section, the last sentence is incredibly important.

The value of the Bookmark property isn't the same as a record number.

When you change the recordset, even by requerying it with the same WHERE conditions, remember that at least in some cases, you are sharing that DB and therefore, potentially sharing the recordset. If someone else updates the recordset and the (Options setting) auto-refresh time passes OR you run a refresh of the recordset yourself, that recordset might not have the same layout as it previously had, and that means the bookmarks from the previous "OpenRecordset" operation are no longer valid. The fact that you even FIND a record using an obsolete bookmark is purely lucky. If you do that, I would advise buying a lottery ticket.
 

Users who are viewing this thread

Back
Top Bottom