Selina Iddon
selina at easydatabases.com.au
Thu Jun 19 08:48:12 CDT 2003
Certainly does help Bruce. Thanks ---------------------------------------------------------------------------- ---- Selina Iddon selina at easydatabases.com.au Ph: 0414 225 265 Easy Access Databases ----- Original Message ----- From: "Bruce Bruen" <bbruen at bigpond.com> To: <accessd at databaseadvisors.com> Sent: Thursday, June 19, 2003 6:27 PM Subject: RE: [AccessD] Keeping place after requerying > Presumably you are using A2K, where I have just had the same problem. > It happens if the continuous form is bound to a stored query for me. > I have saved the form filter setting, the order by and the > AbsolutePosition. I can then restore the form record focus by y > reapplying the saved filter and orderby, then moving to the stored > position + 1, making an allowance for the case of deleting the last row > in the recordset. See if the following helps. > > rk = Me.Recordset.AbsolutePosition > so = Me.OrderBy > oo = Me.OrderByOn > flt = Me.Filter > > If DeleteRow(Me!fldID) Then > Me.Requery > Me.Filter = flt > Me.OrderBy = so > Me.OrderByOn = oo > If rk + 1 > Me.Recordset.RecordCount Then > rk = Me.Recordset.RecordCount > Else > rk = rk + 1 > End If > > DoCmd.GoToRecord , , acGoTo, rk > endif > > > Hth > Bruce > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Thursday, June 19, 2003 5:27 PM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Keeping place after requerying > > > Hi Selina > > > I understandably annoyed customer because everytime they delete > > something from their very long list and the data is requeried (via > > code), they end up at the top of their list again and have to scroll > > down. Can anyone please help in how I keep the focus on the next > > record to the one they have just deleted? > > Why do you requery the form? That shouldn't be necessary - except for an > unbound form ... > > /gustav > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >