Hi,
I've created a main form that populates a subform using 2 combo boxes, however I'm having difficulty trying to create a sum of the total amounts of the results of the population.
I have a Grand_Total field in my form that the subform is based on.
In my main form if I try to reference to the Grand_Total in the form my subform is based on then I get a #Name? error (=forms![form]![Grand_Total) and if I try to calculate it myself it comes up with a #Error (=sum(forms![form]![Amounts])).
Using the reference the only way I can get it to work is to populate the subform, open the form the subform is based on and then click into the subform in my main form. Obviously, that is longwinded and was hoping if there was a way of making it automatic when I click my command button that populates the subform.
Sorry if that's hard to understand, i usually don't explain things very well
Sunny
I've created a main form that populates a subform using 2 combo boxes, however I'm having difficulty trying to create a sum of the total amounts of the results of the population.
I have a Grand_Total field in my form that the subform is based on.
In my main form if I try to reference to the Grand_Total in the form my subform is based on then I get a #Name? error (=forms![form]![Grand_Total) and if I try to calculate it myself it comes up with a #Error (=sum(forms![form]![Amounts])).
Using the reference the only way I can get it to work is to populate the subform, open the form the subform is based on and then click into the subform in my main form. Obviously, that is longwinded and was hoping if there was a way of making it automatic when I click my command button that populates the subform.
Sorry if that's hard to understand, i usually don't explain things very well
Sunny
Comment