How do I populate my primary key field within my subform?

I have a subform (ProblemList) that constist of 2 fields: ICD9_Code & ICD9_Description
Can someone please tell me how to populate field tbI_OfficeVisits_CD9.ICD9_Code within my subform?   I am pulling in the Description field just fine.  Please see my attachment and note subform Problem List.

My syntax
SELECT [tbl_OfficeVisits_ICD9].[ICD9_Code], [tbl_ICD9].[Description], [tbl_OfficeVisits_ICD9].[Patient_id] FROM tbl_ICD9 INNER JOIN tbl_OfficeVisits_ICD9 ON tbl_ICD9.ICD9_Code=tbl_OfficeVisits_ICD9.ICD9_Code;
ProblemList-ICD9Code.docx
donvike1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Have you set the Master and Child linkfields for the subform to the correct fields? If you do, then Access will automatically save the parent value in the child record.

However, generally you would include only the "ID" field when relating records, and not the description. Can you explain why you're doing both?
0
donvike1Author Commented:
I need both fields to show up in my Problem List form as in the attachment.
0
donvike1Author Commented:
Ok, I checked my Master/Child fields
Link Master Fields = Patient_id
Link Child Field = Patient_id

How can I set this to ICD9_Code?
0
donvike1Author Commented:
I was able to resolve this by pointing the Source Object field to a query  - query is based on tbl_OfficeVisits_ICD9 fields OCD9_Code and Description.  I got my results - see my attachment.
ProblemList-ICD9Code-2.docx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
donvike1Author Commented:
I was able to resolved the issue at hand.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.