Continuous Form Records question

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?
 
B

Beetle

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
 
G

Gsurfdude

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?
 

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

Top