Wrecker,
While human brain understands perfectly the notion of 'last record entered in the database', database intelligence does not go so far. First record, last record, middle record, what difference does it make? A record is a record and nothing else. Therefore you -the developer-need to provide the database with a tiny piece of info to define the notion.
It is a (bad) habit to have an incremental AutoNumber as key to find the last record. And most of the users are surprised when it fails. That's because AutoNumber does
not assure a continuous - or ordered - sequence of numbers to rely on.
All AutoNumber does is to create arbitrary unique numbers. If set to Increment, it tries to keep an ordered sequence.
A better way is to have a time stamp field, set to Now() when record is saved (AfterInsert event).
Best way is to create your own numbering system to number the records when they are created. Do a search on the forum for information on how to do it.
Last, but not least, you have a form. The form can be sorted in various ways.
GoToLastRecord will go to the last
displayed record, not to the last entered...
And...just to make sure I didn't get it totally wrong:
Do you mean that the cursor does not go to the last displayed record, but somewhere in the middle of the form, about 20 records before the end???
Never heard of that...if that's the case, you're probably facing some code corruption...
HTH
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Daniel Vlas
Systems Consultant