automatically enter data into form field

I have a form with 3 fields. fields a, b, and c. I would like field c to be equal to a*b. what do i put in the property sheed of field c to achieve this?
vnaresAsked:
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.

TextReportCommented:
If you are NOT storing the data to teh table then you can put the controlsource as =[a]*[b]
If you have the controls on the form linked to fields then in the AfterUpdate of A and B you need to put

Me!c = Me!a * Me!b

Cheers, Andrew
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
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Access cannot refer to other columns at the table level ... you could do this on a Form as Andrew suggests, or you could build a Query:

SELECT ColA, ColB, (ColA + ColB) AS ColC FROM YourTable

This would show you the sum of A + B for each record in YourTable. However, generally you do NOT store calculated values in a Table, since Access can recreate this as needed (re: the query example), and you should generally do that to insure that your data is always correct. Otherwise, if someone comes along later and changes the value in ColA and forgets to update ColC, your data is skewed.
0
Computer101Commented:
Forced accept.

Computer101
EE Admin
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.