Change recorset

D

Dylan Moran

I have a subfrom for "communications" (tblCommunications).

This subform is sorted in descending date order, so that the last
communications (by date) is shown when the form is opened. I have command
buttons on the subform that go to First, Next, Previous and Last. Because
the recordset is in descending order, the code behind the buttons is
'mirrored' or 'reversed'. That is, acLast is in the First Button, acNext is
in the Previous button etc. This is all good and works fine until you enter
a new record, when it appears my recordset is suddenly sorted in Ascending
order. The new record is put at the beginning of the recordset, such that
the next button (acPrevious) goes to my first record and subsequent records.

I hope this makes some sense and someone has experieinced this before.

So my solution I suppose is that when the new button is clicked, I want to
make my recordset for the subform to sort Descending. Any ideas on how to do
this? Any other comments are welcomed.
 
K

Klatuu

I don't know for sure that this will help, but try Me.Requery in the After
Update event of your subform.
 

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