Sorting Data in a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that pulls directly from a table (no query involved). How do I
sort the data by one of the fields in the form (i.e. month)?
 
In the form's properties, under data, enter the field you want sorted by in
OrderBy. You then will have to right click when the form is open to apply
the sort order. If you always want the same order, then you can click on
the right of the record source field in properties, and create a "query"
that contains all of your fields and assign the sort order to the field you
want.

Damon
 
In your form's properties, Data tab, the record source is probably your
tablename.
If so, change that to:
Select * from [TABLENAME] order by [MONTH];

The caps have to be your item names. Use the braces.
This SQL will take the place of a stored named query so that you won't need
one.

UpRider
 

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

Back
Top