Field duplication

  • Thread starter Thread starter Preston
  • Start date Start date
P

Preston

Guest
Im a bit new to this so please excuse if this is a stupid question. I have a simple database with 2 table. The first table is customer info, the 2nd is equipment that the customer has. There is a field in the first table called discription. I need that field copied to an identical field in the 2nd table. Is there a way to do this. It would basically just be the same info available in 2 differnt areas. But only update in one. thanks for any help.
 
I'm not sure what you are driving at but one of the great advantages of relational database engines like Access is that you do not need to store the same data twice. The other is that it looks like your customers table is the parent table of the one that records what your customers have. In the customer table the fields should define the customer only including a key field that uniquely identifies the customer like a customer ID. In the other table each record would describe an item and the customer ID of the customer that has it. You can then run a query to tie them together for reporting purposes.
 
This are no dumb questions... Here is how your tables should be set up:

tblCustomer
CustomerID (Primary key and autonumber)
CustomerName
Address
...rest of fields

tblEquipment
EquipmentID (Primary key and autonumber)
CustomerID (Foreign key and long integer)
Description
...other fields related to the equipment

These tables should be joined in the Relationship window on CustomerID and Enforce Referential Integrity should be checked. Create a form based on the Customer table. Create a form (datasheet view) on the Equipment table. Add the Equipment form to the Customer form as a Subform. Now you can select a customer and view, add, edit the equipment that belongs to them in the subform....

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom