Hi James, I had a similar challenge while writing my piece of software for the NZ Police.
I managed to create a solution which works as follows: - Data entry form - User selects a Region from a drop-down menu activated by a button. Results of choice are displayed on the form - User selects a City from a drop-down menu activated by a button. Results of choice are displayed on the form (menu is based on previous selection) - User selects all, one or more Suburbs within the City (again activated by a button and displayed) - User selects all, one or more Streets within the Suburb(s) >From that point onwards you can do all kinds of selects based on the street records that you selected. We use it to select people with certain criminal histories. As you can see, you browse hierarchical through the tree. Each next select is based on the parameters of the previous select. Not to dissimilar to Organisations, Business Unit, Departments, Staff or Music genre, CD Title, Songs etc. I am more than happy to share this specific piece (RBase 6.5) of code with you. Regards Frank -----Original Message----- From: James Hageman [mailto:[EMAIL PROTECTED] Sent: Thursday, 25 September 2003 03:05 To: [EMAIL PROTECTED] Subject: [RBASE-L] - CHOOSE based on previous CHOOSE I have 3 tables, [main], [building], and [department]. Main has FKs for Building and Department. I want to know what departments i have in certain buildings (maybe more than one) I first get the Building FK here: (I can choose by building name and return the building key) CHOOSE vbuildcode FROM #VALUES FOR building_name, building_id + FROM building + ORDER BY building_name LINES 25 Then I get the Department FK based on the first CHOOSE: CHOOSE vdeptcode FROM #VALUES FOR DISTINCT (department_code & [[ name of dept from dept table]]), department_code + FROM main + WHERE building_code=.vbuildcode ORDER BY department_code What I want to to be able to also have the name of the department show up in the second choose, but I can't figure out how to do that. ____________________________________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Air New Zealand immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Air New Zealand. _____________________________________________________________________ For more information on the Air New Zealand Group, visit us online at http://www.airnewzealand.com _____________________________________________________________________

