Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Continuous Form Records question

Geek News

Continuous Form Records question
Gsurfdude 12/4/2008 4:16:09 PM
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?
RE: Continuous Form Records question
Beetle 12/4/2008 6:02:18 PM
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" wrote:

[Quoted Text]
> 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?
RE: Continuous Form Records question
Gsurfdude 12/5/2008 12:37:02 PM
Worked like a champ! Thanks.

"Beetle" wrote:

[Quoted Text]
> 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" wrote:
>
> > 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?

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net