Auto Scrolling to last record in subform after update

  • Thread starter Thread starter WSF
  • Start date Start date
W

WSF

Access 97

I have an unbound form in which the user enters data for a new record.
After validating the data, the record is then added to a table pending a
batch post to other tables.
I have placed the data entry controls in the form header and the subform in
the detail section.
The subform displays an accumulation of the records as added - that works
fine.
But is there a way I can have the subform auto scroll to the last-entered
entry at the bottom of the list each time the subform is refreshed? Rather
than having to use the pesky vertical scroll bar.

Regards,
WSF
 
Depending on how you are using this, there a few ways to accomplish this.
One is if the records are consecutivly ordered using autonumber, then you
might consider sorting the recordset in the subform to desending. This will
put the last entered record at the top of the subform. Another way is to set
the focus on the subform and use the find command and bookmark. (you will
see examples in online help from the VBA IDE.
THT
 
One more way is if it always the last record then you can also use the goto
command with acLast. see help for details.
 
Back
Top