Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Primary and Secondary keys in a table 1

Status
Not open for further replies.

ronphx

Programmer
Jun 24, 2004
64
US
I am more curious about this than anything, because most indexing and sorting is done through queries, but in Excel you can sort a range by a primary and secondary field. Can you have a primary and secondayr sort field when you view an Access table or can you only sort one field at a time?
 
You may create composite index.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you. That's it. How do I activate that index when I am viewing the table?
 
You have to know that in a relational database the rows of a table are in no particular order.
Only the ORDER BY clause of a SELECT instruction may arrange the result set in your expected way.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks again. I use the select and order by statements when coding, but every once in a while I just want to click on the table and open it to view the contents in the composite order. Sounds like I'll still have to do a simple query to see the multiple sorted fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top