phoenxMan
asked on
Referencing Calculated fields in Subforms in Access 2007
I have two subforms on an Access Main Form. I need to get two calculated values from each subform footer and add together on the main form. One of the subforms is embedded into a second subform. This one holds the calculation of TotalDuration of multiple sessions in another subform. See image on first link here stored on Jing. http://screencast.com/t/E9gCEctqB
Short Flash video explaination on this link.
http://screencast.com/t/HLwX4rQU0Ya
HELP!
Short Flash video explaination on this link.
http://screencast.com/t/HLwX4rQU0Ya
HELP!
ASKER
In my string I am setting the value of a calculated field from a subform1 to a subsubform2 . The syntax is correct but it is returning a "0" verses the value as shown.When I do this an unbound control on the parent form (main) it gets the value correctly.
=[Forms]![FRMSimSetupHeade r]![sbfrmS imWCSessio nsList].[F orm]![SumT otalTime]
I am going to try setting the calculation to a bound control on the subsubform with event procedure to store it and update as the values change. Not the way I want to do this but will see if this will work. Otherwise I tried to use Dsum() to calculate the totals minutes in a series of sessions but it gets the where clause parameter from the subform1. Doesn't work. I first placed all three subforms as children to the main from and used a filter criteria verses the Master Child function to synchronize the two subforms. But Access 2007 gives a request for parameter when loading the form the first time. BIG BUG In access 2007.
Do you have any solutions to this problem?
=[Forms]![FRMSimSetupHeade
I am going to try setting the calculation to a bound control on the subsubform with event procedure to store it and update as the values change. Not the way I want to do this but will see if this will work. Otherwise I tried to use Dsum() to calculate the totals minutes in a series of sessions but it gets the where clause parameter from the subform1. Doesn't work. I first placed all three subforms as children to the main from and used a filter criteria verses the Master Child function to synchronize the two subforms. But Access 2007 gives a request for parameter when loading the form the first time. BIG BUG In access 2007.
Do you have any solutions to this problem?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the feedback. I did try this early. However, I tested the technique of reference the second embedded calculation field in a simple form and it worked as it was suppose to,. Then I rebuilt the problem form and added new fresh controls to get the calculated values and now it works. I have experience more anomolies in Access 2007 not working as it should then suddenly it works. But now I have the solution and I am happy.
OK
;-)
;-)
forms!MFname!SFContainerCo
MFName is the name of the main form.
SFContainerControlName is the name of the control on the main form that holds the subform.
SSFContainerControlName is the name of the control on the subform that holds the sub-subform.
ControlName is the name of the control on the sub-subform.