Ctrain
A fundemental issue with data integrity is that the child records, for example PARTS for and ORDER must have access to the primary key of the primary key for the parent key which is used as the foreign key in the child records.
As long as you can maintain this concept, you should be okay.
From a practicle perspective, for a one-to-many relationship, this usually means you can append/add on the ONE side or the MANY side but not both sides of relationship at one time.
Useful approaches to handling mutiple tables is to use subforms embedded in a main form. The main form holds info from the "parent" record, and the subform(s) are used for the child records.
Subforms can be improved upon by...
- making them contineous / tabular / datasheet where many records for the child record for the specific parent can be seen at once.
- using a tab for where each tab / page references different componets / subforms.
Example:
You place an order for parts.
OrderID is the primary key.
I will use a tab form with single and contineous subforms.
Main form depicts basic order info
OrderID, OrderDate, ETADate, Supplier
First tab / page of tab form dispalys the details for the order. Each Parts record includes the OrderID as the foreign key. This is a contineous form. As orders are placed, the system maintains data integrity by automatically adding the OrderID for each new record.
Second tab / page depicts details on the customer - address, phone number, sales rep. This is just a simple single subform keyed on the SupplierID on the Order table (foreign key) and SupplierID on the Supplier table (primary key).
Third tab / page depicts past orders with the same Supplier. Again a contineous form is used to display multiple orders. A command button allows the end user to select a specific past order to look at the details to reference Order, prices, etc.
I hope this helps you envision your application.
Parting words - spend quality time on the design so the database meets your expectations.
Richard