postion subform to last record after adding

A

Abbey Normal

Hello. I have a [customer] form that has a subform form of orders for that
customer. When I add an order, it goes to the [order] form. After adding the
order and closing the [order] form, it goes back to the [customer] form with
the subform and the newly added order appearing as the last record in the
subform. Question is: how do I position the cursor so it goes to that last
record I just added?
I tried doing a DoCmd.GoToRecord , , acLast on current, but it kept jumping
to the last record even if i repositioned it to the first in the subform. I
tried this command on the subform events after update and after insert, but
nothinng happened. Any help would be appreciated. Thank you
 
D

Don Shar

How about changing the record source for the [customer] subform to list the
most recent record at the top (invert your list)? It might be handy to have
these first anyhow.
 
A

Abbey Normal

Omigosh! perfect! Thanks so much!!!!!!!!!!!!!

Don Shar said:
How about changing the record source for the [customer] subform to list the
most recent record at the top (invert your list)? It might be handy to have
these first anyhow.

Abbey Normal said:
Hello. I have a [customer] form that has a subform form of orders for that
customer. When I add an order, it goes to the [order] form. After adding the
order and closing the [order] form, it goes back to the [customer] form with
the subform and the newly added order appearing as the last record in the
subform. Question is: how do I position the cursor so it goes to that last
record I just added?
I tried doing a DoCmd.GoToRecord , , acLast on current, but it kept jumping
to the last record even if i repositioned it to the first in the subform. I
tried this command on the subform events after update and after insert, but
nothinng happened. Any help would be appreciated. Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top