A portion of my tables/relationships is shown below:
PK=Primary Key; fk=Foreign Key; ... indicates there are more fields not shown; the dotted line shows a relationship that was removed.
tblSalesperson
SRInitials (PK) <------------|
.... |
|
tblSalesTerritory |
TerritoryCode (PK) |
SRInitials (fk) |
... |
|
tblCustomerFile |
CustomerID (PK) |
TerritoryCode (fk) |
... |
|
tblOrders |
Order# (PK) |
CustomerID (fk) |
SRInitials --------------->| (fk)
...
tblOrders!SRInitials is present (along with several other fields including compensation rate) to accomodate the fact that changes will occur that would cause wrong info to be associated with an order (e.g. Sales Rep leaves, comp rate changes, etc).
When new orders are created the Sales Rep is known once the Customer is identified and this info is pulled into tblOrders.
Initially I set up tblOrders.SRInitials (fk) to also relate back to tblSalesPerson!SRInitials (PK) because ... it seemed innocuous(?)
When printing the monthly order report there were several orders missing. Ultimately I discovered that I needed to remove this relationship to obtain the correct data.
Is this truly a "flaw" or was the real flaw with my Query?
PK=Primary Key; fk=Foreign Key; ... indicates there are more fields not shown; the dotted line shows a relationship that was removed.
tblSalesperson
SRInitials (PK) <------------|
.... |
|
tblSalesTerritory |
TerritoryCode (PK) |
SRInitials (fk) |
... |
|
tblCustomerFile |
CustomerID (PK) |
TerritoryCode (fk) |
... |
|
tblOrders |
Order# (PK) |
CustomerID (fk) |
SRInitials --------------->| (fk)
...
tblOrders!SRInitials is present (along with several other fields including compensation rate) to accomodate the fact that changes will occur that would cause wrong info to be associated with an order (e.g. Sales Rep leaves, comp rate changes, etc).
When new orders are created the Sales Rep is known once the Customer is identified and this info is pulled into tblOrders.
Initially I set up tblOrders.SRInitials (fk) to also relate back to tblSalesPerson!SRInitials (PK) because ... it seemed innocuous(?)
When printing the monthly order report there were several orders missing. Ultimately I discovered that I needed to remove this relationship to obtain the correct data.
Is this truly a "flaw" or was the real flaw with my Query?