Link to home
Start Free TrialLog in
Avatar of dsoderstrom
dsoderstrom

asked on

Updating fields in a subform record

I have a subform in Access bound to a table.  The subform has several columns that are enabled and several that are not enabled.  All of the columns are bound to fields in the table.  When exiting a record in the subform I want to update the columns that are not enabled based upon data entered in the enabled columns.  What event should I do this on?
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

That will happen automatically.
Avatar of dsoderstrom
dsoderstrom

ASKER

The unenabled columns would update automatically if the Control Source for them was a formula but it's not.  They are bound to fields in the table.  Their value will be determined by what gets entered in several of the enabled columns.
I can put code behind the After Update event of the enabled columns involved in the calculations but I have to put the same code behind each one of them .  I thought it would be easier to do the calculations for all unenabled fields all at once when exiting the record after all enabled fields have been entered.  But, if running the calculations on the After Update event of each field is the only way to do it then I can do it that way.
SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys for straightening me out.  After looking at this a little more I realized that i really do not need to store the calculated values.  I created my own problem by including them in the table and making them bound fields in the form.  I appreciate the help.