Does Orderby effect a Forms' Bookmark ???

  • Thread starter Thread starter Roy Frye
  • Start date Start date
R

Roy Frye

I have a continuous form that has a button that opens a
form which contains detailed data. Once the button is
clicked I set the Form's Bookmark to a Global Var(Bmk).
Upon Exiting the Detail Form, the continuous Form is
requeried and its bookmark is reset to the global var, so
the user will be on the appropriate record.
This works fine except when the continuous form is sorted,
using the orderby property. This causes the error: 3159
Invalid Bookmark.

Forms!frmMain!subToDo.Requery
Forms!frmMain!subToDo.Form.Bookmark = Bmk 'Causes Error

Any Ideas???

Thanks
 
The requery has the potential to change the bookmarks. Pick a field that has
a unique value for each record and search on the field to move to the record
after the requery.
 
Thanks for the reply Wayne.
I Couldn't get your method to work either. I'm sure that I
did something wrong. However I did get the bookmark to
work by setting the Continuous Form's OrderByOn to False
and then back to True.

Forms!frmmain!subToDo.Form.OrderByOn = False
Forms!frmmain!subToDo.Requery
Forms!frmmain!subToDo.Form.Bookmark = Bmk 'Gbl Bmk Var
Forms!frmmain!subToDo.Form.OrderByOn = True

Thanks.
 
Back
Top