Darren Bartrup
Well-known Member
- Joined
- Mar 13, 2006
- Messages
- 1,297
- Office Version
- 365
- Platform
- Windows
I know if I set two fields as Primary Keys then the combination of those two fields cannot be duplicated within the table.
Is there a way of achieving this without setting the fields as Primary Keys?
I have a table with four fields:
[TABLE="width: 300"]
<tbody>[TR]
[TD]ID[/TD]
[TD]AutoNumber and PK[/TD]
[/TR]
[TR]
[TD]sPostalSector[/TD]
[TD]Text[/TD]
[/TR]
[TR]
[TD]lBranchID[/TD]
[TD]Number[/TD]
[/TR]
[TR]
[TD]lGroupName[/TD]
[TD]Number[/TD]
[/TR]
</tbody>[/TABLE]
A combination of sPostalSector and lBranchID field cannot be duplicated.
As sPostalSector is text I'm pretty sure it's not the best idea to have it as part of a Primary Key.
Any help would be greatly appreciated.
Is there a way of achieving this without setting the fields as Primary Keys?
I have a table with four fields:
[TABLE="width: 300"]
<tbody>[TR]
[TD]ID[/TD]
[TD]AutoNumber and PK[/TD]
[/TR]
[TR]
[TD]sPostalSector[/TD]
[TD]Text[/TD]
[/TR]
[TR]
[TD]lBranchID[/TD]
[TD]Number[/TD]
[/TR]
[TR]
[TD]lGroupName[/TD]
[TD]Number[/TD]
[/TR]
</tbody>[/TABLE]
A combination of sPostalSector and lBranchID field cannot be duplicated.
As sPostalSector is text I'm pretty sure it's not the best idea to have it as part of a Primary Key.
Any help would be greatly appreciated.