Blue Hornet
Board Regular
- Joined
- Aug 7, 2003
- Messages
- 224
Hi, and thanks for your attention.
I'd like to show what I want by example. Let's say I have two tables:
tblState, consisting of Autonumber (Key field) and State (required, no dups)
and
tblTown, which is made of Autonumber (Key field), StateID (lookup into tblState, required), and Town (required, DUPS ALLOWED--because a town name can exist in several states).
How can I enforce uniqueness of the Town & State combination without making Town a unique field in its own table AND without making Town either the Primary Key OR any part of it? (The reason I don't want there to be a multi-field Key is that it makes expandable queries difficult or impossible, and I want the application to work within forms based on queries.)
Does that make sense? Is there something simple that I'm overlooking?
Thanks again,
Chris
I'd like to show what I want by example. Let's say I have two tables:
tblState, consisting of Autonumber (Key field) and State (required, no dups)
and
tblTown, which is made of Autonumber (Key field), StateID (lookup into tblState, required), and Town (required, DUPS ALLOWED--because a town name can exist in several states).
How can I enforce uniqueness of the Town & State combination without making Town a unique field in its own table AND without making Town either the Primary Key OR any part of it? (The reason I don't want there to be a multi-field Key is that it makes expandable queries difficult or impossible, and I want the application to work within forms based on queries.)
Does that make sense? Is there something simple that I'm overlooking?
Thanks again,
Chris