Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Old 11-11-2005, 06:53 AM   #1
raydan
Registered User
 
raydan's Avatar
 
Join Date: Aug 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
raydan is on a distinguished road
need to see structured organization with query

Hi, all.

Im trying to show multi level organization with a query and im not sure how to do it. I have a table that is named Originators, that includes all of the persons personal info and this table gererates a OriginatorID. Next I have a table called OrgTree that has the fields as follows:

OriginatorID---Auto lookup to Originators---OriginatorID
LastName--Text
FirstName--Text
StartDate--Date/Time
UpLineOrigID--Autolookup to Originators-OriginatorID
UpLineLast---Text
UpLineFirst--- Text


This works so far, but I would like to see all the people brought in by originator (a) and all the people brougth in by those people and so on. I guess this would be a tree, but im not sure if thats my problem.... Can this be worked out with a query or do I need to do something else. God I hope it can be done with a query.


Thanks for any help.

Scott

raydan is offline   Reply With Quote
Old 11-14-2005, 08:07 AM   #2
neileg
AWF VIP
 
neileg's Avatar
 
Join Date: Dec 2002
Location: Newcastle, England
Posts: 5,975
Thanks: 0
Thanked 8 Times in 8 Posts
neileg has a spectacular aura about neileg has a spectacular aura about
Not at all easy. You don't know how wide or how deep your tree is going to be. If you have fixed width and depth, this is fairly easy. As it is you will need to use VBA and this is beyond the likes of me.

I've tackled this in the past by using OrgPlus. This will take a list of data including the parent ID just as you have and turn this into a nice chart.
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones

Cheers, Neil
neileg is offline   Reply With Quote
Old 11-14-2005, 05:42 PM   #3
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,400
Thanks: 15
Thanked 1,625 Times in 1,543 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
For starters, remove the autolookups from the table. These will cause nothing but trouble once you start using queries and code.

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update query problem Rod C Queries 3 04-09-2009 10:29 AM
cannot recreate a query after deleting it in vba ciqala Modules & VBA 2 08-25-2005 05:11 AM
Query using variable Don White Queries 1 07-04-2005 05:23 AM
Problem Joining Query Results RayH Queries 4 03-07-2005 04:01 PM




All times are GMT -8. The time now is 12:41 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World