I have a table called tblJobs which has details of current clients.
The primary key of this table is jbsID
In this table are fields for the client's contact name and address: jbsSiteName; jbsAddress1; jbsAddress2 etc.
I have another table called tblOneOffJobs.
This table records details of quotations for 'one-off jobs' that are done for the clients in tblJobs.
The primary key of this table is oojID.
There's a field in this table called oojJobID which relates to tblJobs on a one-to-many join.
There are also fields in tblOneOffJobs called oojClientName; oojAddress1, oojAddress2, etc (hold off on the warnings about storing duplicate data for a minute).
When I create a new record in the child table, tblOneOffJobs, the data entered in oojClientName; oojAddress1, oojAddress2, might be the same as jbsSiteName; jbsAddress1; jbsAddress2 etc., but it might not.
I want the default values of the name and address fields in the child table [tblOneOffJobs] to be the same as the details in the parent table [tblJobs].
If the details ARE the same, the user makes no changes however the name and address fields can then be changed if necessary.
So my question is:
I've created a form for tblOneOffJobs (based on a query of tblOneOffJobs and tblJobs).
When the user creates a new record in tblOneOffJobs and selects client from tblJobs, how can I populate oojClientName; oojAddress1, oojAddress2, etc, with values from the related record in tblJobs?
I think it's something to do with an 'After Update' or 'On Change' event using the DLookup function but I haven't been able to get it working.
Thank you for reading and hope you can help.
BTW: Never posted anything in a forum before so please accept humble apologies if I've not followed correct protocol.