Re: Effects on RST in Calling Proc



rkc wrote:

I don't have one single policy on this dilemma, but decide case-by-case.

The op's question involved a recordset opened as a snapshot and no mention was made of a requery. I can't think of a safer senario in
which to use a bookmark.

Thanks to all who replied and I appreciate the discussion on this particular sub thread.


Yes, the current record does indeed change. So what I ended up doing was something similar to book mark, but I used the absoluteposition property.

In the calling procedure, I dimmed a long, lngAbsPos, and did:

lngAbsPos = .AbsolutePosition

And then the called procedure has a long as an argument so lngAbsPos can be passed to it. After various machinations and any movement in the called procedure, the final step in the called procedure is:

rst.AbsolutePosition = lngAbsPos 'as passed from the calling function.

This worked fine and since the snapshot recordset is not changed in any way in the called procedure, I think this is a safe way to do it. The results I'm getting in testing seem to show this as so, anyway.

--
Tim   http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
.



Relevant Pages

  • Re: Form flicker with requery to bookmark
    ... Private Sub CloseForm_Click ... Dim objMainForm As Object ... > Not sure using a bookmark over a Requery is a good idea. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Bookmark Blues
    ... Michael, the approach you are taking cannot work. ... You cannot close the form and reopen it and expect to use the same bookmark. ... Add a primary key to your table, so as to make it easy to FindFirst. ... Avert the need to requery. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Bookmarks and new records
    ... or do what I am doing now and open the form in edit mode (as that works ... >>Adult form was opened in Add mode. ... >>the bookmark, after a requery the bookmark can't be found. ...
    (microsoft.public.access.formscoding)
  • Re: Refreshing sub Form after executing a stored Proc.
    ... Technically, you must make the search after the requery, as there are no ... > Your example for the bookMark worked Great! ... > sample code from the last post. ... > Dim bkm As Variant ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Form flicker with requery to bookmark
    ... Not sure using a bookmark over a Requery is a good idea. ... rather than allenbrowne at mvps dot org. ... You can see the main form flicker during the requery. ...
    (microsoft.public.access.modulesdaovba)