Continuous Form Records question

  • Thread starter Thread starter Gsurfdude
  • Start date Start date
G

Gsurfdude

Hello,

I have a continuous form, when users edit on a row I have to issue a requery
on the form because the data source is a query of 3 tables from linked Oracle
tables (so they can see the changes in real time and other issues). My
questions, once the form requeries, the record pointer goes back to record 1.
The users are complaining that if they're on
record 225 for example, the form refreshes and they have to scroll backdown.
I need to bring them
back to the record that they were editing after performing a requery. Any
suggestions?
 
Capture the Primary Key value of the record in a variable before the
requery, then after the requery, use the recordset clone to find the
correct record and bookmark the form. Something like;

--
Dim lngCurrentPK As Long 'assumes PK value is a Long Integer. Modify if not.

lngCurrentPK = Me![PKField]

Me.Requery

With Me.RecordsetClone
.FindFirst "[PKField] = " & lngCurrentPK
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With
 
Worked like a champ! Thanks.

Beetle said:
Capture the Primary Key value of the record in a variable before the
requery, then after the requery, use the recordset clone to find the
correct record and bookmark the form. Something like;

--
Dim lngCurrentPK As Long 'assumes PK value is a Long Integer. Modify if not.

lngCurrentPK = Me![PKField]

Me.Requery

With Me.RecordsetClone
.FindFirst "[PKField] = " & lngCurrentPK
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With
--
_________

Sean Bailey


Gsurfdude said:
Hello,

I have a continuous form, when users edit on a row I have to issue a requery
on the form because the data source is a query of 3 tables from linked Oracle
tables (so they can see the changes in real time and other issues). My
questions, once the form requeries, the record pointer goes back to record 1.
The users are complaining that if they're on
record 225 for example, the form refreshes and they have to scroll backdown.
I need to bring them
back to the record that they were editing after performing a requery. Any
suggestions?
 
Back
Top