I
injanib via AccessMonster.com
My form has a subform. One of the field in the subform is "txtTotal". The
control Source of this filed is a field called "Total" in the table. There is
an unbound field in the footer of the subform that adds the "Total" field of
the Table with the following in the Control Source.
=sum([Total])
I have made this field "not visible", because I don't want it to appear on
the subform. Instead, I have another field called "txtGrandTotal" on the main
form that I want to display the grand total.
I have made the control source of the "txtGrandTotal" field as follows.
=form!subFormControSource!ControlSource
The problem I have is that I need this field to feed the grand total into a
field called "GrandTotal" in my table. I originally had this filed as the
control souce of my "txtGrandTotal" field of my form, but I could not get the
grand total to show from my subform on my main form.
I tried the "After update", "On dirty", "On change" properties of the field
on the subform to place the data in my "txtGrandTotal" on the main form, but
none of them worked.
I used the following code for that.
me.parent!txtGrandTotal=me.ControlNameOnTheSubform
I hope I did not make this very confusing.
control Source of this filed is a field called "Total" in the table. There is
an unbound field in the footer of the subform that adds the "Total" field of
the Table with the following in the Control Source.
=sum([Total])
I have made this field "not visible", because I don't want it to appear on
the subform. Instead, I have another field called "txtGrandTotal" on the main
form that I want to display the grand total.
I have made the control source of the "txtGrandTotal" field as follows.
=form!subFormControSource!ControlSource
The problem I have is that I need this field to feed the grand total into a
field called "GrandTotal" in my table. I originally had this filed as the
control souce of my "txtGrandTotal" field of my form, but I could not get the
grand total to show from my subform on my main form.
I tried the "After update", "On dirty", "On change" properties of the field
on the subform to place the data in my "txtGrandTotal" on the main form, but
none of them worked.
I used the following code for that.
me.parent!txtGrandTotal=me.ControlNameOnTheSubform
I hope I did not make this very confusing.