Displaying a subform total in a form

G

Guest

I've posted before, but I lost where my post ended up. I've got a column in a
subform which I would like to take the total of. I've put:
=Sum([Candidates])
in the subform footer and put:
=[Centres Subform]![Total]
in the main form (it keeps taking the [] off the Total)
and it only comes up with #Error

I've also tried:
=Sum([Centres Subform]![Candidates])
in the main form, to the same result.

Can anyone help please?
 
J

Joan Wild

"Adding a column in a subform?"
I've posted before, but I lost where my post ended up. I've got a column
in a
subform which I would like to take the total of. I've put:
=Sum([Candidates])
in the subform footer

What is the *name* of this control in the footer?
and put:
=[Centres Subform]![Total]
in the main form (it keeps taking the [] off the Total)
and it only comes up with #Error

If 'Total' is the name of the control, then the textbox on your main form
should have a control source of
=[Centres Subform1].[Form]![Total]
 
G

Guest

"Total" is the name of the control
I've tried putting
=[Centres Subform].[Form]![Total]
but it still comes up with #Error and when I go back into design view it's
taken the [] off the "Form" and "Total"
Do you think it could be something wrong with the column I'm trying to add up?

Joan Wild said:
"Adding a column in a subform?"
I've posted before, but I lost where my post ended up. I've got a column
in a
subform which I would like to take the total of. I've put:
=Sum([Candidates])
in the subform footer

What is the *name* of this control in the footer?
and put:
=[Centres Subform]![Total]
in the main form (it keeps taking the [] off the Total)
and it only comes up with #Error

If 'Total' is the name of the control, then the textbox on your main form
should have a control source of
=[Centres Subform1].[Form]![Total]
 
J

Joan Wild

What is the name of the control on the main form that you are using this?

Is Centres Subform the name of the control on the main form that contains
the subform?

You could use the expression builder to help you build it, and ensure the
correct names are used. Click the build button to the right of the control
source property.

--
Joan Wild
Microsoft Access MVP
"Adding a column in a subform?"
"Total" is the name of the control
I've tried putting
=[Centres Subform].[Form]![Total]
but it still comes up with #Error and when I go back into design view it's
taken the [] off the "Form" and "Total"
Do you think it could be something wrong with the column I'm trying to add
up?

Joan Wild said:
"Adding a column in a subform?"
I've posted before, but I lost where my post ended up. I've got a
column
in a
subform which I would like to take the total of. I've put:
=Sum([Candidates])
in the subform footer

What is the *name* of this control in the footer?
and put:
=[Centres Subform]![Total]
in the main form (it keeps taking the [] off the Total)
and it only comes up with #Error

If 'Total' is the name of the control, then the textbox on your main form
should have a control source of
=[Centres Subform1].[Form]![Total]
 
G

Guest

I've found out it isn't something wrong with displaying it, I tested it with
another box. The formula in the subform footer isn't working. At the moment
it is:
=Sum([Candidates])
Where Candidates is the column I wish to get a total from. My subform is
laid out like a normal table.

Sorry it took so long for me to reply, I've changed my name too.

Joan Wild said:
What is the name of the control on the main form that you are using this?

Is Centres Subform the name of the control on the main form that contains
the subform?

You could use the expression builder to help you build it, and ensure the
correct names are used. Click the build button to the right of the control
source property.

--
Joan Wild
Microsoft Access MVP
"Adding a column in a subform?"
"Total" is the name of the control
I've tried putting
=[Centres Subform].[Form]![Total]
but it still comes up with #Error and when I go back into design view it's
taken the [] off the "Form" and "Total"
Do you think it could be something wrong with the column I'm trying to add
up?

Joan Wild said:
"Adding a column in a subform?"
I've posted before, but I lost where my post ended up. I've got a
column
in a
subform which I would like to take the total of. I've put:
=Sum([Candidates])
in the subform footer

What is the *name* of this control in the footer?

and put:
=[Centres Subform]![Total]
in the main form (it keeps taking the [] off the Total)
and it only comes up with #Error

If 'Total' is the name of the control, then the textbox on your main form
should have a control source of
=[Centres Subform1].[Form]![Total]
 
G

Guest

I've sorted it out now, the name in the table that the subform came from was
wrong, it needed to be the same. Thanks for all your help anyway.

Kay


Kay said:
I've found out it isn't something wrong with displaying it, I tested it with
another box. The formula in the subform footer isn't working. At the moment
it is:
=Sum([Candidates])
Where Candidates is the column I wish to get a total from. My subform is
laid out like a normal table.

Sorry it took so long for me to reply, I've changed my name too.

Joan Wild said:
What is the name of the control on the main form that you are using this?

Is Centres Subform the name of the control on the main form that contains
the subform?

You could use the expression builder to help you build it, and ensure the
correct names are used. Click the build button to the right of the control
source property.

--
Joan Wild
Microsoft Access MVP
"Adding a column in a subform?"
"Total" is the name of the control
I've tried putting
=[Centres Subform].[Form]![Total]
but it still comes up with #Error and when I go back into design view it's
taken the [] off the "Form" and "Total"
Do you think it could be something wrong with the column I'm trying to add
up?

:

"Adding a column in a subform?"
I've posted before, but I lost where my post ended up. I've got a
column
in a
subform which I would like to take the total of. I've put:
=Sum([Candidates])
in the subform footer

What is the *name* of this control in the footer?

and put:
=[Centres Subform]![Total]
in the main form (it keeps taking the [] off the Total)
and it only comes up with #Error

If 'Total' is the name of the control, then the textbox on your main form
should have a control source of
=[Centres Subform1].[Form]![Total]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top