#Name? - What did I do wrong ?, Please help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After a small test using a subform, I applied the technique to a real
application with a mainform contains the following fields:
* Part #:
* Qty:
In the Detail section of the subform, it contains multiple Comp_Names, Unit
Weight of each Component and the Total Weight based on the QTY in the
mainframe.
Comp_Name Unit_Weight Total_Weight

where "Total_Weight" is a computed field which contains a formula:
Forms!Mainform!Qty*Unit_Weight
In the Footer section, it contains two fields:
"Total_Unit_Weight" contains a formula "sum(Unit_Weight)" to sum up the unit
weight of all Comp_Name
"Total_Part_Weight" contains a formula "Forms!Mainform!Qty*sum(Unit_Weight)

Problem: In the "Total Weight", "Total_Unit_Weight" and "Total_Part_Weight"
fields, Access displays "#Name?".

Can someone please tell me what is the problem ?

Please note that name of each field is correctly identified and entered.
 
Wellie,

Since you're using functions, you have to precede them with equals signs ("=")
, hence:

sum(Unit_Weight) should be

=Sum(Unit_Weight). Also,

=Forms!Mainform!Qty*Unit_Weight
=Forms!Mainform!Qty*sum(Unit_Weight)

Hope this helps,

Sam
 
OK, Wellie, let's try something else.

Is it possible that the names of these 3 textboxes are actual names of fields?
You can't have that when the actual data is bound to something other than
field (such as a formula).

Sam?
I do have the "=" in front of each computed formula.

In this case, what is the problem ?
[quoted text clipped - 34 lines]
 
To avoid this conflect that the textbox name same as field name, I added
"Fld" at end of each name of the box. The result remains the same.

Please continue to help.

OfficeDev18 via AccessMonster.com said:
OK, Wellie, let's try something else.

Is it possible that the names of these 3 textboxes are actual names of fields?
You can't have that when the actual data is bound to something other than
field (such as a formula).

Sam?
I do have the "=" in front of each computed formula.

In this case, what is the problem ?
[quoted text clipped - 34 lines]
Please note that name of each field is correctly identified and entered.
 
I'm stumped. Anyone?

Sam
To avoid this conflect that the textbox name same as field name, I added
"Fld" at end of each name of the box. The result remains the same.

Please continue to help.
OK, Wellie, let's try something else.
[quoted text clipped - 13 lines]
 
I have a similar problem. My form is mainly based on a 'detail' query, but I
want to include a field from a 'summary' query (based on the same data). I
used the Expression Builder to select the data source as a field in the
'summary' query, but the text box only displays "#Name?" when I switch to
Form View.

What more does the thing want?

OfficeDev18 via AccessMonster.com said:
I'm stumped. Anyone?

Sam
To avoid this conflect that the textbox name same as field name, I added
"Fld" at end of each name of the box. The result remains the same.

Please continue to help.
OK, Wellie, let's try something else.
[quoted text clipped - 13 lines]
Please note that name of each field is correctly identified and entered.
 
Hi,
if you need to multiply values in main and subform - right approach, I
think, is to add both tables to subform recordsource and multiply fields
there, instead of referring to main form control.
HTH

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

Allen_N said:
I have a similar problem. My form is mainly based on a 'detail' query, but
I
want to include a field from a 'summary' query (based on the same data). I
used the Expression Builder to select the data source as a field in the
'summary' query, but the text box only displays "#Name?" when I switch to
Form View.

What more does the thing want?

OfficeDev18 via AccessMonster.com said:
I'm stumped. Anyone?

Sam
To avoid this conflect that the textbox name same as field name, I
added
"Fld" at end of each name of the box. The result remains the same.

Please continue to help.

OK, Wellie, let's try something else.

[quoted text clipped - 13 lines]

Please note that name of each field is correctly identified and
entered.
 
Thanks Alex,

I haven't built a subform yet, so I'm still a bit uncertain. Are you saying
that the only way a form can refer to more than one table/query is to use
subforms?

I have found that I can refer to fields on other forms OK, but that approach
will lead to a profusion of forms that serve no other purpose than to feed
data from disparate queries to the main form.


Alex Dybenko said:
Hi,
if you need to multiply values in main and subform - right approach, I
think, is to add both tables to subform recordsource and multiply fields
there, instead of referring to main form control.
HTH

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

Allen_N said:
I have a similar problem. My form is mainly based on a 'detail' query, but
I
want to include a field from a 'summary' query (based on the same data). I
used the Expression Builder to select the data source as a field in the
'summary' query, but the text box only displays "#Name?" when I switch to
Form View.

What more does the thing want?

OfficeDev18 via AccessMonster.com said:
I'm stumped. Anyone?

Sam

Wellie wrote:
To avoid this conflect that the textbox name same as field name, I
added
"Fld" at end of each name of the box. The result remains the same.

Please continue to help.

OK, Wellie, let's try something else.

[quoted text clipped - 13 lines]

Please note that name of each field is correctly identified and
entered.
 
Hi,
original poster, Wellie, mentioned that he have a subform, that is why I
talked about subform

as for your question - if you need to show details and summary on one form -
then perhaps you can build a form similar to Order in Northwind sample
Access application

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

Allen_N said:
Thanks Alex,

I haven't built a subform yet, so I'm still a bit uncertain. Are you
saying
that the only way a form can refer to more than one table/query is to use
subforms?

I have found that I can refer to fields on other forms OK, but that
approach
will lead to a profusion of forms that serve no other purpose than to feed
data from disparate queries to the main form.


Alex Dybenko said:
Hi,
if you need to multiply values in main and subform - right approach, I
think, is to add both tables to subform recordsource and multiply fields
there, instead of referring to main form control.
HTH

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

Allen_N said:
I have a similar problem. My form is mainly based on a 'detail' query,
but
I
want to include a field from a 'summary' query (based on the same
data). I
used the Expression Builder to select the data source as a field in the
'summary' query, but the text box only displays "#Name?" when I switch
to
Form View.

What more does the thing want?

:

I'm stumped. Anyone?

Sam

Wellie wrote:
To avoid this conflect that the textbox name same as field name, I
added
"Fld" at end of each name of the box. The result remains the same.

Please continue to help.

OK, Wellie, let's try something else.

[quoted text clipped - 13 lines]

Please note that name of each field is correctly identified and
entered.
 

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

Back
Top