Hello,
I am trying to bypass a form's automatic update, and instead call a
stored procedure in sql server. I am using continuous forms. The
problem I am having is with returning to the next selected record once
I have performed the update.
i.e. user edits record A and then clicks on record B. Record A is
updated, and selection moves to record B. I don't know how to
determine what record B is...
The best that I am able to achieve so far is listed in my code below.
This returns to the most recently updated record once the update is
performed. Here's the gist of my code in the BeforeUpdate event:
Private Sub Form_BeforeUpdate(Cancel As Integer)
...code to manually call an update stored procedure
' bookmark record A position
vntBookmark = form.bookmark
' refresh form
Form.Undo ' this stops the regular update process from occuring
Form.Refresh ' this requery's the db so that the updates are visible.
' go to saved position
Form.Bookmark = vntBookmark
end Sub
The above code returns to record A after the refresh. Does anybody
have any suggestions on how to bookmark the "next" selected record
(record B)?
Any solutions/suggestions would be greatly appreciated.
Thanks,
Todd