William Hindman
wdhindman at dejpolsystems.com
Mon Dec 24 15:41:16 CST 2007
...tables themselves have no "default" sort order, reflecting only the order in which each record was originally entered unless you set a specific sort order for it ...those of us who use ANs as our primary keys often assume that a table is automatically sorted by its primary key but that is not the case ...the AN reflects the record entry order, not the table sort order ...setting a different pk will quickly show you the reality. ...when you create a form or report based on a table or query, it automatically inherits the sort order of the source ...if you create it based on an open source, the current sort order of the source is inherited by it ...if the source is not open when you create the form or report, the saved sort order is inherited by it ...there are of course, limitations ...the form or report inherits the source sort order only if it is based upon a single table, else you have to set the Order By yourself. ...probably clear as mud, but its xmas eve, eh :) William ----- Original Message ----- From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Monday, December 24, 2007 1:45 PM Subject: Re: [AccessD] Sort Order of a Table > "but it sure simplifies my life in using the contents. > > This would be when working in the table directly? Since in a form it > would > be set by the primary key or ORDER BY clause, no? > > Rocky > > > > > > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Monday, December 24, 2007 10:16 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Sort Order of a Table > > ...I sort the table contents based upon the way the data will be most > frequently used ...I also set indexes on those fields on which > sorts/searches are likely to be based ...that way a query based upon it > doesn't have to reindex the data before passing it on ...a tblCompany is > going to be sorted by the CompanyName ...a tblContacts by the LastName > ...how much of a difference in time it makes I don't know but it sure > simplifies my life in using the contents. > > William > > ----- Original Message ----- > From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com> > To: "'Access Developers discussion and problem solving'" > <accessd at databaseadvisors.com> > Sent: Monday, December 24, 2007 12:48 PM > Subject: [AccessD] Sort Order of a Table > > >> Dear List: >> >> Sometimes when I'm looking at a table I'll resort it by one column or >> another. Mostly they're sorted by the Autonumber ID. When I go to close >> it, I'm asked if I want to save changes. Mostly I say no. >> >> So question: is there a difference in the table or in the way data is >> retrieved and/or most importantly in retrieval time, depending on how the >> records are displayed - sorted by primary key or another field? Can I >> just >> leave the table sorted by, say name or address or social security number >> without a performance penalty? >> >> MTIA >> >> Rocky >> >> >> >> >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.17.7/1194 - Release Date: > 12/23/2007 > 5:27 PM > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com