Almost got it. Change order on subform After new record added

A

Avid Fan

Almost there

I have a customer sub form
Every thing works great.

I have ordered the records in descending order.

The only thing is when I hit the new call record and save it
the record appears at the bottom of the list.

When I change to another customer then go back every thing is how it
should be. New record at top of the list.

I have put a me.requery command in the subform but does not seem to work
 
J

Jeanette Cunningham

Use OrderBy to set the name of the field to sort on and which direction,
Desc for descending, and leave blank for the default of ascending.
Then set OrderByOn to True.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
D

DevlinM

New records are always added to the end of the recordset. If want the new
record to fall into order by what ever sorting criteria, you need to re-sort
the recordset on an event such as after update, or perhaps a change of focus
when you return to the parent form. If you need more details, feel free to
ask.

Cheers!
 
A

Avid Fan

Use OrderBy to set the name of the field to sort on and which direction,
Desc for descending, and leave blank for the default of ascending.
Then set OrderByOn to True.
The on the subform Order By - calldate DESC already set.

Is OrderByOn on the for Order By On Load? set yes.

This did not change the problem

I put this in a button on the main form and it fixed the problem

DoCmd.RunCommand acCmdRefresh


Can I just mention at this point how impressed I am by the help that I
have received from the Access Community at this newsgroup.

Thank you all
 

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