P
placek
Hi guys
I have three tables:
tblCompany (lngCompanyNumberCnt[PK], strName)
tblBranch ( lngBranchNumberCnt[PK], strEmail,
lngCompanyNumber[FK])
tblContact(lngContactNumberCnt[PK], strName, strEmail,
lngBranchNumberCnt[FK])
One company may have many branches and one branch may have
several contacts. As Access specified that PK and FK must
have the same data type , they all have Number type apart
from lngContactNumberCnt which has autonumber.
I have a data entry form with tblCompany fields in the
main form and tblBranch fields in sub form. In an ideal
world a data entry clerk would input lngBranchNumberCnt or
lngCompanyNumberCnt in a sequence, so allocating the next
number is straight forward. However, it may be pheasable
that the clerk inputs these PK in a hap hazard fashion
(e.g. 1, 2, 3, 8, 11, 56, 677, ........etc.). In this
situation it is impossible to keep track of those numbers
used as PK.
So, the next time someone goes to input a Branch Number it
is possible that they will use an existing one. I have
found that in these cases, Access prevents you from
creating the record [due to duplicate indices]. Is the
only way to prevent this to stand over the data entry
clerk 's shoulder, to ensure that these PK's are inputted
in STRICT sequence?
Thanks, Martin
I have three tables:
tblCompany (lngCompanyNumberCnt[PK], strName)
tblBranch ( lngBranchNumberCnt[PK], strEmail,
lngCompanyNumber[FK])
tblContact(lngContactNumberCnt[PK], strName, strEmail,
lngBranchNumberCnt[FK])
One company may have many branches and one branch may have
several contacts. As Access specified that PK and FK must
have the same data type , they all have Number type apart
from lngContactNumberCnt which has autonumber.
I have a data entry form with tblCompany fields in the
main form and tblBranch fields in sub form. In an ideal
world a data entry clerk would input lngBranchNumberCnt or
lngCompanyNumberCnt in a sequence, so allocating the next
number is straight forward. However, it may be pheasable
that the clerk inputs these PK in a hap hazard fashion
(e.g. 1, 2, 3, 8, 11, 56, 677, ........etc.). In this
situation it is impossible to keep track of those numbers
used as PK.
So, the next time someone goes to input a Branch Number it
is possible that they will use an existing one. I have
found that in these cases, Access prevents you from
creating the record [due to duplicate indices]. Is the
only way to prevent this to stand over the data entry
clerk 's shoulder, to ensure that these PK's are inputted
in STRICT sequence?
Thanks, Martin