I have two tables one holding client details and one called data for the main functionality of the darabase.
They both have a short text primary key field and these are linked one to one - as I only want one record per client in the data table.
It is not an auto number as I wish to use the client code from my accounts package.
When adding a client I have a form which has all the fields related to this table. It also contains a sub form linked to the data table and containing a text box with the control source of the primary key field. This is also the child field to the parent field - the client id on the main form
At present when the code is added to the master field it is replicated in the child field as desired. Ie I have linked the records using a unique identifier.
However although this adds data to the client table the child field does not create a new record in the data table. I want it to so that this can be queried out elsewhere and further data added.
How can I get the closing of the form using a button to not only save the new client record from the fields on the main form but also save the data in the sub form child field to the underlying other table? Note the subform is bound to the data table