How to sort datasheet within a form

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

I have viewed the MS help and set the column I want to
sort on with OrderBy DESC, but the property is not applied
(according to the documentation). However, the sort
functions are enable which allows me to manually sort the
column.
1. Do I need to code some sort of routine to apply the
sort sequence when the datasheet is loaded with the form?
2. Would a query with the sort order specified be a
possible solution rather than loading the data from a
table which is linked to a parent in this case?
3. Is there a method that would allow at "Last In First
Out" or LIFO where the ability to add a new record to this
datasheet can be a the very top rather than having to
scroll to the last line?

Thank you very much!
Rich
 
This is the solution. Base your Form on a Query.

Not easily! What you can do is use an unbound Form with two Subforms
(I'd recommend Continuous forms rather than datasheets, since it's
very easy for the two datasheets to get out of alignment, and you lose
the visual effect).

Put two subforms one above the other, lined up to match. The upper one
would have its Data Entry property set to TRUE, so it will show only
the blank "new record" or the record just entered. The lower subform
will have Allow Additions set to False, Allow Edits to True, and be
based on the query sorted as desired.
 
Back
Top