sorting by categories

  • Thread starter Thread starter MAX
  • Start date Start date
M

MAX

Hello,

I have some Issue tables that are linked by Categories.
What I want to do is have the records grouped in a
specific order by the categories.

I think I need to start in the query but what I want to do
is sort the records by categories for Data entry and
Reports. I tried to bring in a sort table in the query
but the query lost the ability to update.
The order of categories is SAFETY, PERMITS, DESIGN, RFI'S,
RFC'S, SUBMITTALS, PROCUREMENT, CONSTRUCTION, QUALITY,
PROJECT SCHEDULE, OWNER AND OTHER BUSINESS. I am not sure
if I need to sort it in the query first, or if it can be
done in the Form. Also, not to sure how to sort it out in
the report. I went as far as creating two queries. One
that reads from the table. (this is updateable) The other
queries the first query and is linked to a sort table.
This loses the ablity to be updated, but it returns with
the correct order. Hope this isn't too confusing.

Any help would be great.

max
 
A query will be updatable only whey you join from a Primary Key in one table
to a foreign key in another. I would expect your tables should look
something like:

tblCategories: Category (PKey), SortSeq
Data:
"Safety", 1
"Permits", 2
"Design", 3
etc...

tblIssues: IssueID (Pkey), Category, other fields...

You should be able to create a query on the two tables, link them by
Category, and sort on the SortSeq from tblCategories. The trick is making
the category a Primary Key.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR?pg=personal&fr_id=1090&px=1434411
 
Back
Top