Subform and Main From calucation

T

TyF

I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
K

Klatuu

--
Dave Hargis, Microsoft Access MVP

[Valuation subform] should be the name of the subform control on the main
form, not the name of the form specified in the subform control's Source
Object property.
 
D

Duane Hookom

A subform control has "Name" and "Source Object" properties. You must use the
Name in your expession. You must also use the name of the control on the
subform.

The name of the control on the main form can't be the name of a field in the
form's record source.
 
T

TyF

I entered this expression and still received an error message.
Main Form Name: Location
Subform Name: Valuation
Unbound Text on subform name: Total Weight

Beetle said:
It should be;

Forms![MainFormName]![Valuation Subform].Form![Total Weight]
--
_________

Sean Bailey


TyF said:
I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
D

Dennis

Assuming you have called the text box on your subform footer holding the
calculation Total Weight then you access it like this

=[Forms]![MainFormName]![Valuation Subform].Form.[Total Weight]
 
T

TyF

Valuation is the name of the subform
The main form name is Location
The unbound text on the subform: Total Weight

Klatuu said:
--
Dave Hargis, Microsoft Access MVP

[Valuation subform] should be the name of the subform control on the main
form, not the name of the form specified in the subform control's Source
Object property.

TyF said:
I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
T

TyF

It's not...
Subform name:Valuation
Main form name: Location
unbound text on subform: Total Weight
I have checked and I am still getting the name# error in the text box on the
main form.


Duane Hookom said:
A subform control has "Name" and "Source Object" properties. You must use the
Name in your expession. You must also use the name of the control on the
subform.

The name of the control on the main form can't be the name of a field in the
form's record source.

--
Duane Hookom
Microsoft Access MVP


TyF said:
I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
B

Beetle

If you are entering this directly in the control source of a control on your
form, then;

=Forms![Location]![Valuation].Form![Total Weight]

If youy are doing this in VBA, then;

Me![Valuation].Form![Total Weight]

If that doesn't work, check the name of the subform *control*. The name
is the subform control is usually, but not necessarily, the same as the name
of the subform itself.

--
_________

Sean Bailey


TyF said:
I entered this expression and still received an error message.
Main Form Name: Location
Subform Name: Valuation
Unbound Text on subform name: Total Weight

Beetle said:
It should be;

Forms![MainFormName]![Valuation Subform].Form![Total Weight]
--
_________

Sean Bailey


TyF said:
I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
T

TyF

I entered =[Forms]![Location]![Valuation subform].Form.[Total Weight] and
press enter on control source. I still get the name# error and it takes the
brackets of forms and location

Dennis said:
Assuming you have called the text box on your subform footer holding the
calculation Total Weight then you access it like this

=[Forms]![MainFormName]![Valuation Subform].Form.[Total Weight]

TyF said:
I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
B

Beetle

The name of your subform (and most likely your subform control as well)
isn't "Valuation subform", it's just "Valuation" (at least according to your
previous post).
--
_________

Sean Bailey


TyF said:
I entered =[Forms]![Location]![Valuation subform].Form.[Total Weight] and
press enter on control source. I still get the name# error and it takes the
brackets of forms and location

Dennis said:
Assuming you have called the text box on your subform footer holding the
calculation Total Weight then you access it like this

=[Forms]![MainFormName]![Valuation Subform].Form.[Total Weight]

TyF said:
I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
T

TyF

Yes it is just Valuation

Beetle said:
The name of your subform (and most likely your subform control as well)
isn't "Valuation subform", it's just "Valuation" (at least according to your
previous post).
--
_________

Sean Bailey


TyF said:
I entered =[Forms]![Location]![Valuation subform].Form.[Total Weight] and
press enter on control source. I still get the name# error and it takes the
brackets of forms and location

Dennis said:
Assuming you have called the text box on your subform footer holding the
calculation Total Weight then you access it like this

=[Forms]![MainFormName]![Valuation Subform].Form.[Total Weight]

:

I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
B

Beetle

So you don't add the word subform to the name when you are referring
to it. As per my other post, it should be;

=Forms![Location]![Valuation].Form![Total Weight]

--
_________

Sean Bailey


TyF said:
Yes it is just Valuation

Beetle said:
The name of your subform (and most likely your subform control as well)
isn't "Valuation subform", it's just "Valuation" (at least according to your
previous post).
--
_________

Sean Bailey


TyF said:
I entered =[Forms]![Location]![Valuation subform].Form.[Total Weight] and
press enter on control source. I still get the name# error and it takes the
brackets of forms and location

:

Assuming you have called the text box on your subform footer holding the
calculation Total Weight then you access it like this

=[Forms]![MainFormName]![Valuation Subform].Form.[Total Weight]

:

I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
D

Duane Hookom

If the control is located on the form [Location], then you should only need:
=[Valuation].Form![Total Weight]
--
Duane Hookom
Microsoft Access MVP


Beetle said:
So you don't add the word subform to the name when you are referring
to it. As per my other post, it should be;

=Forms![Location]![Valuation].Form![Total Weight]

--
_________

Sean Bailey


TyF said:
Yes it is just Valuation

Beetle said:
The name of your subform (and most likely your subform control as well)
isn't "Valuation subform", it's just "Valuation" (at least according to your
previous post).
--
_________

Sean Bailey


:

I entered =[Forms]![Location]![Valuation subform].Form.[Total Weight] and
press enter on control source. I still get the name# error and it takes the
brackets of forms and location

:

Assuming you have called the text box on your subform footer holding the
calculation Total Weight then you access it like this

=[Forms]![MainFormName]![Valuation Subform].Form.[Total Weight]

:

I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 
M

Maximilian Osenberg

Beetle said:
If you are entering this directly in the control source of a control on your
form, then;

=Forms![Location]![Valuation].Form![Total Weight]

If youy are doing this in VBA, then;

Me![Valuation].Form![Total Weight]

If that doesn't work, check the name of the subform *control*. The name
is the subform control is usually, but not necessarily, the same as the name
of the subform itself.

--
_________

Sean Bailey


TyF said:
I entered this expression and still received an error message.
Main Form Name: Location
Subform Name: Valuation
Unbound Text on subform name: Total Weight

Beetle said:
It should be;

Forms![MainFormName]![Valuation Subform].Form![Total Weight]
--
_________

Sean Bailey


:

I have a subform within a form. I have entered a calculation on the subform
footer =Sum([weight])
On the main form I created an addtional text box and entered =[Valuation
subform].Form![Total Weight]
I keep getting the #Name error in the text box what am I doing wrong?

It totals perfectly on the subform.
 

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