Hi everyone
I have a main form , “House ” containing a subform ,”works”.The main form has a one to many relationship with the sub form.
How can I display a total on a mainform which is the sum of a field ,”estimate”, on the subform which corresponds to the id field on on the main form.I.E. The result of “SELECT DISTINCTROW Sum(Works.Estimate) AS SumOfEstimate FROM Works WHERE HOUSE.HOUSEID = WORKS.HOUSEID”
I tried an unbound textbox on the house form and set the controlsource to the above query but it doesn’t work. Sameal suggested using unbound forms but is this the only way?
Thanks in anticipation.
quinny
I have a main form , “House ” containing a subform ,”works”.The main form has a one to many relationship with the sub form.
How can I display a total on a mainform which is the sum of a field ,”estimate”, on the subform which corresponds to the id field on on the main form.I.E. The result of “SELECT DISTINCTROW Sum(Works.Estimate) AS SumOfEstimate FROM Works WHERE HOUSE.HOUSEID = WORKS.HOUSEID”
I tried an unbound textbox on the house form and set the controlsource to the above query but it doesn’t work. Sameal suggested using unbound forms but is this the only way?
Thanks in anticipation.
quinny