Allen,
I still get a #Name error with
=[FrmWkItemEntrySb1].[Form]![FrmWkItemEntrySb2].[Form]![SumGWages]
Access is adding the [] on "Form".
And the main form, subform1 and subform2 do contain records.
The names of the controls do not match each other nor do they match actual
field names from the underlying tables or queries.
Anyway, I made a header for Subform1, put a summing control in it, and
that worked. And it displays the number I was looking for. (I put a couple
calculating fields in the query for subform1 so it could pull the data
from the query.)
But again, when I try to refer to that new control in the main form I get
a #name error. I guess I haven't figured out how to make this work yet.
GC
Allen Browne said:
Form Header section should work just as well as the Form Footer.
Since it works correctly in the subform, the problem must be with the
ControlSource of the text box that attempts to show the result on the
main form. I take it you have nested subforms, so the expression would be
like this:
=[Subform1].Form![Subform2].Form![Text17]
Sorry: the word "no" is transposed in the unclear sentence, i.e.:
c) The expression may produce #Error or #Name if the subform contains
NO records ...
Chips said:
Allen,
I have the control in the footer (I also tried the header, which is
where I really want it). I did the naming of the controls so there was
no conflict.
I am getting the #Name? error.
I don't quite understand your sentence below. But it may explain
what I need. My subform is nested two deep from the main form (It's
Subform2 inside Subform1).
The summing control in the subform itself works fine in the header
and in the footer. It's the control that refers to it in the main form
that gets the #Name? error.
My subform does add new records, but in it's own table. It does
not affect the main form's table.
Thanks,
Greg
c) The expression may produce #Error or #Name if the subform contains
on records - not even the new record row (i.e. you can't add new
records
in the subform.)