using bookmark in continuous form

  • Thread starter Thread starter Jesper Fjølner
  • Start date Start date
J

Jesper Fjølner

If the ID field on a continuous subform is "recID".
How do I :
"remember" this (as a bookmark with recordsetclone?) > Requery the subform
and then go to the bookmarked record (so it again becomes the current
record?)

Jesper
 
Bookmarks are recreated when a recordset is requeried so you can't
"remember" a bookmark from before the requery and use it after the requery.

Save the unique ID of the record and use it with the FindFirst method after
the requery.
 
Bookmarks are recreated when a recordset is requeried so you can't
"remember" a bookmark from before the requery and use it after the
requery.

Save the unique ID of the record and use it with the FindFirst method
after the requery.


I'm having some trouble with this.
For now I'm putting the unique ID in a textfield on the form 'tmp', but I
guess I could use a global variable.
After requerying the subform (sub1) how do I make the record 'tmp' on sub1
the active record instead of the first record (as it happens with a
requery)?

Jesper
 
Here's some sample code:

Dim varID As Variant

varID = Me.ProductID.Value
Me.Requery
If Not IsNull(varID) Then
Me.Recordset.FindFirst "productID=" & varID
End If
 
Here's some sample code:
Dim varID As Variant

varID = Me.ProductID.Value
Me.Requery
If Not IsNull(varID) Then
Me.Recordset.FindFirst "productID=" & varID
End If

Thansk very much, that did it :-)


Jesper
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top