Hi Misty,
You need to store the contract information in a separate table, which is
related to the vendors table in a one-to-many (1:M) relationship. The vendors
table would be the parent table (the "one" side of the relationship), and the
contract information table would hold zero to many related records for each
vendor. You may even want to add a third table, if the number of contract
types is relatively fixed.
You can display this information on a form using the form/subform setup. The
main part of the form would display vendor information (name, address, city,
phone, etc.) while the contract information would be displayed in a subform
in datasheet view.
Here is a suggested setup for a three-table design:
tblVendors
pkVendorID Autonumber primary key
VendName
VendContact
VendAddress
+ other attributes related specifically to the vendor
tblContractTypes
pkContractID Autonumber primary key
ContractType
+ other attributes related specifically to the contract
tblVendContracts
pkVendContID Autonumber primary key
fkVendorID Long Integer foreign key to tblVendors
fkContractID Long Integer foreign key to tblContracts
StartDate
EndDate
Using the Tools > Relationships menu, you would create relationships between
the primary and foreign keys with similar names, ie:
pkVendorID ---> fkVendorID (1:M) and
pkContractID---> fkContractID (1:M)
The tblVendContracts table serves as a "linking" (aka "intersection" or
"join") table. This is how you model a many-to-many (M:N) relationship
between vendors and ContractTypes.
To help prevent duplicate entries, you can create a multi-field unique index
on four fields in this last table: fkVendorID, fkContractID, StartDate and
EndDate. Of course, that would mean that you could not have two contracts of
the same type with the same vendor that had identical starting and ending
dates.
Here is more information that you might find useful on database design:
http://www.datatexcg.com/Downloads/DatabaseDesignTips1997.pdf
http://www.datadynamicsnw.com/accesssig/downloads.htm
(See the last download titled "Understanding Normalization")
http://support.microsoft.com/?id=234208
http://support.microsoft.com/?id=289533
If my answer has helped you, please answer yes to the question that reads
"Did this post answer the question?" at the bottom of the message thread.
Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
:
I am creating a database to track our vendors. Each vendor has a contract
which is renewed at various times (annually, bi-annually, etc.). I would like
to keep the start and end date of each contract, but do not want to enter all
the vendor's information each time there is a new contract. What is the best
way to set the table/form up to capture the contract start and end date each
time we renew?