Sorting a column in a datasheet programatically

R

Rob

Hi all,

I was wondering if it possible to sort a datasheet in a subform based on
dates in a column. For example, I have a subform that lists milestones
related to a task. On occasion a milestone is added that is dated before
some of the other milestones already associated with the task. When the
form is displayed I can select the Date column and right click -> sort
ascending/descending. I was wondering if there is a way of doing this
programatically?

Any pointers or tips would be appreciated,

Cheers
Rob
 
R

Rob

Hi all,

Sorted my problem by reading another unrelated post. Rather than base
my subform on a table, I have based it on a query and now have the
functionality I require.

This then lead me to another question. Is it accepted practice to base
subforms on queries rather than tables?

Cheers
Rob
 
M

Mr B

Rob,

It is not only acceptable, but it is the most likely way to create your data
source.

You have many more options avaiable when you base any record source on a
query instead of trying to just use the entire table.
 

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