View Full Version : Main and Subform syncronisation


PeteUK
08-30-2001, 06:27 AM
Hi.

I posted a "help me" the other day and am still having the same problem. I have my main form up and running nicely - called ClientListTable which has a CustomerID as it's primary key. Now, I have three sub forms which are different departments which all relate to the master record. What I want is when on the record I want, for example Manchester United PLC, I want to be able to add data to the subforms which relate only to the above record. So, when I move to another record, the subforms are either blank or have data relating to that particular record.

At the mo, all that happens when I populate the subforms is when I move to another record and go back, the form is empty. The three other tables have a ProductID as a primary key as I want to keep every record in the subforms with a different ID different from the customerID.

Hope someone can help. Thanks in advance!!

Pete

Rich
08-30-2001, 11:57 AM
You need to set your relationships with primary/foreign keys set correctly.
Have a look at some of the sample databases supplied by access to see how its done. Look at Northwind, Orders Solutions etc.
HTH

Pat Hartman
09-02-2001, 04:19 PM
The master/child links are not properly set on the main form.

veso5
09-03-2001, 01:26 AM
You need to set relations between tables, first. Then relate the master form to subforms by CustomerId.
For all subforms you need to set linked child field/CustomerID on subtable/ to Linked master field?CustomerId on MainTable/.

Is that help?

Vesselin Todorov