Putting a calculated value into a form field.
Putting a calculated value into a form field.
(OP)
I'm real beginner on creating Access forms. I've fumbled my way through most of it, but am stuck on how to get a calculated value to display onto the screen and also update into a field in the database. Example: Priority, Rank, and Status are all numeric fields entered by user. PriorityFactor is the multiplied product of these three fields. When a user enters or modifies a value in one of the three fields, I want the PriorityFactor to be re-calculated, displayed, and stored. The PriorityFactor value can be 0. Any and all suggestions greatly appreciated.
RE: Putting a calculated value into a form field.
So to fix it, have the text box bound to the field
And then have the formula in an event such as the "On current" Event of the form.
Or
Say you have a column of numbers that you enter in values.
Then after you key in the last value you want the total text box to show the total of all of the above.
So in the last text before the totals box put the formula in its "After_Update" event.
Then when you key in a value it will move out of it and trip the "After update" and your totals box will have the correct total and so will the table.
DougP, MCP
dposton@universal1.com
Ask me how Bar-codes can help you be more productive.
RE: Putting a calculated value into a form field.
RE: Putting a calculated value into a form field.
PriorityFactor = sum(status * rank * priority)
on the 'after update' event of the first three combo boxes.
Mike Rohde
rohdem@marshallengines.com