Reference calculated value from subform

  • Thread starter Proposal Doctor
  • Start date
P

Proposal Doctor

I have a calculated value in the Form Footer of a subform that I now want to
show on the main form. I have used
=[Forms]![frmGoNoGoAssessScroll]![txtPoints] where txtPoints is the name
of object in the subform. I have replaced the bangs with periods. And I
have tried every variation possible and still can't get it to work.

Do I need to reference the Form Footer? If so, how do I do so in Access
2007. All I ever get is #Name?

Thanks.

David
 
T

tina

within the context of the mainform, the subform is not a form object in the
database window, so the standard reference won't work. instead, try

=[SubformControlName].[Form]![txtPoints]

replace SubformControlName with the correct name of the subform control
within the mainform. this may be the same as the name of the subform form
object in the database window, or it may be different. to understand the
difference, and how get the correct name, go to
http://home.att.net/~california.db/instructions.html and click the
"SubformControlName" link to see the pdf file.

hth
 
P

Proposal Doctor

This reply may appear twice so ignore one...

Thanks Tina.

This still doesn't work. I recall that references to objects in Access 2007
are different from those in previous versions of Access.

But in case, I used the wrong terms and confused the issue, here is a more
complete explanation.

The subform name is frmGoNoGoAssess.
The calculated value is shown in the subform window and is named txtPoints.
txtPoints is in the subform's Form Footer.
The calculated value (txtPoints) is the sum of Points and they too are
calculated values. = Sum([Points])

Points are displayed in the Detail window.

txtPoints should be able to be displayed in the main form because it is
displayed in the subform with no problem.

Will your syntax work now?

David


tina said:
within the context of the mainform, the subform is not a form object in the
database window, so the standard reference won't work. instead, try

=[SubformControlName].[Form]![txtPoints]

replace SubformControlName with the correct name of the subform control
within the mainform. this may be the same as the name of the subform form
object in the database window, or it may be different. to understand the
difference, and how get the correct name, go to
http://home.att.net/~california.db/instructions.html and click the
"SubformControlName" link to see the pdf file.

hth


Proposal Doctor said:
I have a calculated value in the Form Footer of a subform that I now want to
show on the main form. I have used
=[Forms]![frmGoNoGoAssessScroll]![txtPoints] where txtPoints is the name
of object in the subform. I have replaced the bangs with periods. And I
have tried every variation possible and still can't get it to work.

Do I need to reference the Form Footer? If so, how do I do so in Access
2007. All I ever get is #Name?

Thanks.

David
 
T

tina

well "This still doesn't work" doesn't give me much to go on. you say that
your subform is named "frmGoNoGoAssess". but *is that the name of the
subform control within the mainform?* did you look at the instruction pdf
file and get the correct name of the subform control? what is it? and did
you try the reference syntax i posted, with that correct subform control
name? and you say that references are different in A2007 from previous
versions...what syntax would you use in a previous version? and can you
convert that to A2007 syntax? i don't use A2007, so if reference syntax *is*
different, i can't help you there, sorry.

hth


Proposal Doctor said:
This reply may appear twice so ignore one...

Thanks Tina.

This still doesn't work. I recall that references to objects in Access 2007
are different from those in previous versions of Access.

But in case, I used the wrong terms and confused the issue, here is a more
complete explanation.

The subform name is frmGoNoGoAssess.
The calculated value is shown in the subform window and is named txtPoints.
txtPoints is in the subform's Form Footer.
The calculated value (txtPoints) is the sum of Points and they too are
calculated values. = Sum([Points])

Points are displayed in the Detail window.

txtPoints should be able to be displayed in the main form because it is
displayed in the subform with no problem.

Will your syntax work now?

David


tina said:
within the context of the mainform, the subform is not a form object in the
database window, so the standard reference won't work. instead, try

=[SubformControlName].[Form]![txtPoints]

replace SubformControlName with the correct name of the subform control
within the mainform. this may be the same as the name of the subform form
object in the database window, or it may be different. to understand the
difference, and how get the correct name, go to
http://home.att.net/~california.db/instructions.html and click the
"SubformControlName" link to see the pdf file.

hth


Proposal Doctor said:
I have a calculated value in the Form Footer of a subform that I now
want
to
show on the main form. I have used
=[Forms]![frmGoNoGoAssessScroll]![txtPoints] where txtPoints is the name
of object in the subform. I have replaced the bangs with periods. And I
have tried every variation possible and still can't get it to work.

Do I need to reference the Form Footer? If so, how do I do so in Access
2007. All I ever get is #Name?

Thanks.

David
 
P

Proposal Doctor

Thanks again Tina. I really appreciate your help.

I'll keep trying to understand the syntax for Access 2007. I pulled out my
copy of Access 2007 VBA by Hennig et.al. last night and see that it has a
section on subforms. If nothing works, I'll save the calculated value to a
'throw-away' table and pull it from there.

Have a Great Day!

David

tina said:
well "This still doesn't work" doesn't give me much to go on. you say that
your subform is named "frmGoNoGoAssess". but *is that the name of the
subform control within the mainform?* did you look at the instruction pdf
file and get the correct name of the subform control? what is it? and did
you try the reference syntax i posted, with that correct subform control
name? and you say that references are different in A2007 from previous
versions...what syntax would you use in a previous version? and can you
convert that to A2007 syntax? i don't use A2007, so if reference syntax *is*
different, i can't help you there, sorry.

hth


Proposal Doctor said:
This reply may appear twice so ignore one...

Thanks Tina.

This still doesn't work. I recall that references to objects in Access 2007
are different from those in previous versions of Access.

But in case, I used the wrong terms and confused the issue, here is a more
complete explanation.

The subform name is frmGoNoGoAssess.
The calculated value is shown in the subform window and is named txtPoints.
txtPoints is in the subform's Form Footer.
The calculated value (txtPoints) is the sum of Points and they too are
calculated values. = Sum([Points])

Points are displayed in the Detail window.

txtPoints should be able to be displayed in the main form because it is
displayed in the subform with no problem.

Will your syntax work now?

David


tina said:
within the context of the mainform, the subform is not a form object in the
database window, so the standard reference won't work. instead, try

=[SubformControlName].[Form]![txtPoints]

replace SubformControlName with the correct name of the subform control
within the mainform. this may be the same as the name of the subform form
object in the database window, or it may be different. to understand the
difference, and how get the correct name, go to
http://home.att.net/~california.db/instructions.html and click the
"SubformControlName" link to see the pdf file.

hth


message
I have a calculated value in the Form Footer of a subform that I now want
to
show on the main form. I have used
=[Forms]![frmGoNoGoAssessScroll]![txtPoints] where txtPoints is the
name
of object in the subform. I have replaced the bangs with periods. And I
have tried every variation possible and still can't get it to work.

Do I need to reference the Form Footer? If so, how do I do so in Access
2007. All I ever get is #Name?

Thanks.

David
 

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