HELP please, linking related values in different tables

  • Thread starter Thread starter rymer_uk
  • Start date Start date
R

rymer_uk

Guest
here is some pics so, you can see what problem im having (all help is welcomed and i'll thank you before hand, sooo err thank you ! :D)

http://img.photobucket.com/albums/v604/rymer_uk/rel.jpg

http://img.photobucket.com/albums/v604/rymer_uk/database.jpg

what i'm trying to do is to get the values from one (just entered) record to auto populate another in another table.

Im using sub forms for each tab and there are three tables involved.

tblInvoice, tblGeneral, tblMachine

from the tblInvoice I want to take the tblInvoice.InvoiceID (autonumber) to tblGeneral into the tblGeneral.InvoiceID (number) when the sub form is called. also on the sub form there is two tables tblGeneral and tblMachines now i want the tblGeneral.GeneralID (autonumber) to auto populate the tblMachine.GeneralID (number).



Can any one suggest any other ideas or a solution ?! help please :D


Many thanks Owen.
 
Do the fields you mention (on your subforms) populate when you enter the details on your subforms? There would be little point having them populate before you enter any details as that would essentially be creating blank records.
 
Hi Rymer,

Long time since I've posted an answer so I may be a little Rusty !

Your form structure does not match your table structure, as you need nested subforms ie

Form = Invoice Entry
Subform = General

Form = General
Subform = Machine.

You do not necessarily need to show the linked ID fields on the subform as if you set the master and child relationships in form design view (properties- data) to the linked field - InvoiceID betweeen Invoice form and General Form; GeneralID between General Form and Machine Form.

The linked field will be automatically filled in as soon as you enter other data into the subform.

Search for nested subforms here for more related help.
 

Users who are viewing this thread

Back
Top Bottom