How do you reference the current row in a where clause on a table design?
As an example, let's say we have three tables, company, address and employee:
* addresses belong to companies and have a CompanyID
* An employee has an AddressID to indicate the address at which they reside and a CompanyID to indicate which company they work for.
In the table design we want the dropdown for the addressID to be limited to the addresses matching the Employees CompanyID
So, for the design of the lookup clause in Employee, how do I reference my own CompanyID?
Steve
PS Before there are loads of "don't use lookups in table design..." we're prototyping a system and want to quickly be able to produce sample forms and modify data by clicking on tables!
As an example, let's say we have three tables, company, address and employee:
* addresses belong to companies and have a CompanyID
* An employee has an AddressID to indicate the address at which they reside and a CompanyID to indicate which company they work for.
In the table design we want the dropdown for the addressID to be limited to the addresses matching the Employees CompanyID
So, for the design of the lookup clause in Employee, how do I reference my own CompanyID?
Steve
PS Before there are loads of "don't use lookups in table design..." we're prototyping a system and want to quickly be able to produce sample forms and modify data by clicking on tables!