sorting data on a form

sorting data on a form

Post by Jerry Cros » Sun, 16 Oct 2005 02:01:54


I have a simple form with seven fields, based directly on a simple table
with seven fields. When the form is opened, I'd like the records displayed
in alpha order on the field [LastName]. I've typed "LastName" and
"[LastName]" (without quotes) in the order by property, but it doesn't do
anything.

What am I missing here?

Jerry
 
 
 

sorting data on a form

Post by Duane Hook » Sun, 16 Oct 2005 02:53:07

Why not set the order in the form's record source query?

--
Duane Hookom
MS Access MVP

 
 
 

sorting data on a form

Post by Jerry Cros » Sun, 16 Oct 2005 02:59:06

Easily done, I guess. Currently I have the source as the table, since I'm
using all 7 fields. Is it more efficient to use a query as the record
source rather than a table in that situation?

Jerry
 
 
 

sorting data on a form

Post by Susan » Sun, 16 Oct 2005 03:02:47

Also, if you don't want a stored query that users can modify, you can set
the source of the form to the select statement directly, such as SELECT *
FROM yourTable ORDER BY LastName
 
 
 

sorting data on a form

Post by Duane Hook » Sun, 16 Oct 2005 08:44:10

A query should not slow your form loading.

--
Duane Hookom
MS Access MVP