I have three tables which I intend to use to allow someone to specify a department, category and subcategory for a record that is stored in another table.
DocsDept
--------
DocsDeptID (Autonumber)
DocsDept (Text)
DocsCat
-------
DocsCatID (Autonumber)
DocsDept (Number)
DocsCat (Text)
DocsSubCat
----------
DocsSubCatID (Autonumber)
DocsDept (Number)
DocsCat (Number)
DocsSubCat (Text)
I am trying to build a three level interdependent menu and so my plan is to read the three tables into a recordset and then use some client side javascript to do the menus.
So far for my query I have:
SELECT DocsDept.DocsDept, DocsCat.DocsCat, DocsSubCat, DocsDept.DocsDeptID AS DocsDeptID, DocsCat.DocsCatID AS DocsCatID, DocsSubCat
(FROM DocsCat RIGHT JOIN DocsDept ON DocsCat.DocsDept=DocsDept.DocsDeptID) RIGHT JOIN DocsSubCat ON DocsCat.DocsCatID=DocsSubCat.DocsCat
ORDER BY DocsDept.DocsDept, DocsCat.DocsCat;
But I am getting an error 'Syntax error (missing operator)'. Any ideas where I am going wrong? The query should basically produce something like this, listing all departments, categories and all subcategories with their relevant ID's:
| DocsDept | DocsCat | DocsSubCat | DocsDeptID | DocsCatID | DocsSubCatID |
Thanks very much
Ed
DocsDept
--------
DocsDeptID (Autonumber)
DocsDept (Text)
DocsCat
-------
DocsCatID (Autonumber)
DocsDept (Number)
DocsCat (Text)
DocsSubCat
----------
DocsSubCatID (Autonumber)
DocsDept (Number)
DocsCat (Number)
DocsSubCat (Text)
I am trying to build a three level interdependent menu and so my plan is to read the three tables into a recordset and then use some client side javascript to do the menus.
So far for my query I have:
SELECT DocsDept.DocsDept, DocsCat.DocsCat, DocsSubCat, DocsDept.DocsDeptID AS DocsDeptID, DocsCat.DocsCatID AS DocsCatID, DocsSubCat
(FROM DocsCat RIGHT JOIN DocsDept ON DocsCat.DocsDept=DocsDept.DocsDeptID) RIGHT JOIN DocsSubCat ON DocsCat.DocsCatID=DocsSubCat.DocsCat
ORDER BY DocsDept.DocsDept, DocsCat.DocsCat;
But I am getting an error 'Syntax error (missing operator)'. Any ideas where I am going wrong? The query should basically produce something like this, listing all departments, categories and all subcategories with their relevant ID's:
| DocsDept | DocsCat | DocsSubCat | DocsDeptID | DocsCatID | DocsSubCatID |
Thanks very much
Ed