B
BetaMike
Hi all,
Our business rules dictate that we assign a sequential 6-digit ContractNo to
each new customer.
(tblCustomers "Bloggs International" has a ContractNo of 000221 (PK))
If "Bloggs" contracts us to work at two of their business premises we would
add two records to tblSites for their respective address details.
(tblSites "BloggsUK" and "BloggsUSA" are assigned '01' and '02' under SiteID)
I would like to combine both of the above values into one field (in
tblSites) to be used as a PK.
Eg. "BloggsUK" = '000221-01' and "BloggsUSA" = '000221-02'
tblCustomers
ContractNo = 000221 (PK)
tblSites
ContractNo = 000221 (FK)
SiteID = 01
SiteNo = 000221-01 (PK)
tblOthers
SiteNo = 000221-01 (FK)
This seems quite complicated but it's the only way I can see it working for
us. Does anybody have any other suggestions or can anyone give an example of
code that would perform the above?
Thanks.
PS...
I've just bought the 'Access 2003 - Inside Out' book. Have I spent wisely or
not?
Our business rules dictate that we assign a sequential 6-digit ContractNo to
each new customer.
(tblCustomers "Bloggs International" has a ContractNo of 000221 (PK))
If "Bloggs" contracts us to work at two of their business premises we would
add two records to tblSites for their respective address details.
(tblSites "BloggsUK" and "BloggsUSA" are assigned '01' and '02' under SiteID)
I would like to combine both of the above values into one field (in
tblSites) to be used as a PK.
Eg. "BloggsUK" = '000221-01' and "BloggsUSA" = '000221-02'
tblCustomers
ContractNo = 000221 (PK)
tblSites
ContractNo = 000221 (FK)
SiteID = 01
SiteNo = 000221-01 (PK)
tblOthers
SiteNo = 000221-01 (FK)
This seems quite complicated but it's the only way I can see it working for
us. Does anybody have any other suggestions or can anyone give an example of
code that would perform the above?
Thanks.
PS...
I've just bought the 'Access 2003 - Inside Out' book. Have I spent wisely or
not?