Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add New record in Subform

Status
Not open for further replies.

mondeoman

MIS
Dec 7, 2006
203
GB
I have a main form that contains data from a table called tbl_Interim_Certificate that has a primary key field called Job_Reference. The subform is based on a table called tblFinalCertificate. The foreign key for this table from tbl_Interim_Certificate is also Job_Reference. What I want is that when I open the main form it automatically adds the job_Reference from tbl_Interim_Certificate to tblFinalCertificate. Any suggestions please.
 
Link the subform to the main form.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
mondeoman said:
but this does not seem to have any effect
What do you mean by this? Are you suggesting that any added records in the subform don't inherit the value of the Job_Reference field from the main form?

Or, do you actually want to add a record without any content or action by the user? If this is the case, it is quite unorthodox.

Duane
Hook'D on Access
MS Access MVP
 
No I am trying very hard to follow the rules of normaisation. The main part of the form is based on a query that derives information from a number of tables, tblEmployers, tblIssuers, tblContractors etc. This form is using that information based on a Job_reference. But when I add a new record to the final certificate I need to add a new record based on the Job_Reference originally put in the tbl_Interim_Certificate. I am try to avoid the necessity of the user inputing the Job referenc number but simply concentrating on the additional information required by the table in other fields. I hope this is understandable otherwise let me know what else I can provide. The graphic should hopefully provide some clarification but if not let me know.
 
 http://www.box.net/shared/vyve6yuqgh
Again, set the LinkChildFields and LinkMasterFields properties of the subform.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks again PHV. I thought I had done this but clearly I had not. Have gone through the exercise again and now seems to be working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top