In that case try this in the Open event of the form:
DoCmd.RunCommand acCmdRecordsGoToLast
that should do the trick... -- Maurice Ausum
"BrunoKP" wrote:
[Quoted Text] > Hello Maurice > No I don't want to add a new record, I just want to move to the last > existing record. > I have tried this, but end up in the first record: > > Private Sub Form_Load() > Dim rst As dao.Recordset > Dim dbsCurrent As Database > > Set dbsCurrent = CurrentDb() > Set rst = Me.RecordsetClone > rst.MoveLast > rst.Close > dbsCurrent.Close > End Sub > > I suppose that the recordset has not yet been displayed when Form_Load() is > activated. The question is, which event is the right one to use? > > Thank you > Bruno > > "Maurice" skrev: > > > if it's an editable form you could use something like: > > > > docmd.openform "formname",,,, acformAdd > > > > this will take you to a new record in the form. In a continuous form that > > will show the last record and a new record where you can start typing... > > -- > > Maurice Ausum > > > > > > "BrunoKP" wrote: > > > > > I want a form coded to move to the last record immediately after the form has > > > been opened. > > > I don't want the recordset to be sorted, and I can't use Open event as the > > > first record has not yet been displayed.
|