Display data from list box into text box

Folks,
I have lost touch using Access 2013.
My database is VERY simple. Two tables and one form. The purpose of this database is to track receipts and the protein, carbs and fats associated with the receipt. I have hundreds of receipts and their associated protein, carbs and fat contents. What I'm trying to do is assign the correct number of proteins, carbs and fats to each receipt.  
Table one is called Receipt has three fields: AutoNumber, Receipt (text field) and a field I call PCF (number).
Table two is called PCF and has four fields: AutoNumber, Protein (number), Carbs (number) and Fats (Number)
My form let me enter in a receipt name I'm also using a list box based upon table two PCF, that gives me various combinations of protein, carbs and fats.
There are also three text fields: Protein, Carbs, Fats. When I select from my list box the combination associated with the receipt I would like to display in each text box the protein, carbs and fats that I selected.
My question is how do I show in my text boxes the protein, carbs and fats?
Frank FreeseAsked:
Who is Participating?
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.

Rey Obrero (Capricorn1)Commented:
what is the row source of your listbox?

if your listbox has three columns, you can refer to each column of the listbox like this

me.protein=me.listboxname.column(0)  ' first column of listbox
me.carbs=me.listboxname.column(1)  ' 2nd column of listbox
me.fats=me.listboxname.column(2)  ' 3rd column of listbox


*note - you have to use the name of the textboxes.
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
Rey Obrero (Capricorn1)Commented:
oh, and place the codes above in the afterupdate event of the listbox
0
Frank FreeseAuthor Commented:
The row source is a query. OK, now I'm beginning to recall how to do this. Let me try first - thanks so far
0
Frank FreeseAuthor Commented:
OK Rey - perfect! Thanks
0
Frank FreeseAuthor Commented:
thank you kindly
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.