control source equation for total sale

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

Guest

I am using a version of "order entry" that came with Access. I have modified
it siginficanly and I need to add a variable to the "total sale" equation in
the "orders by customer". Ievery time I do I get a #name? and #error in
Order total and Balance due. I have added this to every other place in this
database and it works fine so I know that something is right. How do I edit
this equation?????
 
Without knowing exactly what you're trying to enter, it's difficult to say.
But it sounds rather like an error arising from using the same name for a
field and the control which holds that field - something which Access is
prone to, since that's the default. Try changing the name of the control
which is giving the #name? message. Or, you may need to change the name of
a control which is being used in the record source for that control, if it
is an equation referring to other controls.

HTH,

Rob
 
I guess you referred to the "Order Form" in the sample database "NorthWind"
that comes with Access software???

You need to describe the "variable" you need to add and how this "variable"
relates to the Fields in the RecordSource of the Form / and where this
"variable" comes from before anyone can offer a suggestion.
 
I am using "order entry" that was in the sample database files. I have had no
trouble with any of the other changes I have made, but this one I have been
working on for days with no success.

I added a field to the table "orders" called "NutritionTest" caption
"NutritionTest", data type currency. I added it to the form "orders" by
dragging it from the "fields" window with the control source "NutritionTest",
name "NutritionTest", default value "0".

I needed to add this total to 3 places. The two that worked are: in the
"orders" form "OrderTotal" and in the "Invoice" report "OrderTotal". I
simply added it with a +[NutritionTest] to the existing equation (with line
total or subtotal, sales tax and freight charge).

Where it isn't working is: "Orders by Customer" form. Subform, orders by
customer subform. The text box is "total sale"

The equation there is:
=[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]+[NutritionTest],
- where I added the + [NutritionTest],but it gets the #name? error msg and
the #error for amount due (which gets its total from total sale). The
[FreightCharge] is in the same table "orders" and form "orders" as is
[NutritionTest] that I added, and the equation works without my addition.
This is only one of the two items I need to add, but until I get the first
one I can't add the second.

Thanks for any suggestions

I have tried using the expression editor and adding it by finding in below
in the forms folder and clicking on it in the <forms> column same problem.
 
Not sure which Subform on the "Customer Orders" Form but have you modified
the Query being used as the RecordSource for the Subform) to include the
added Field [NutritionTest]?
 
No. I don't know how to do that. I do know that "NutritionTest" is not
listed in the fields list when Orders by Customer is open, but FreightCharge
is even tho it isn't on this form. I'm guessing what you said has something
to do with this. Can you tell me how to do this?

Van T. Dinh said:
Not sure which Subform on the "Customer Orders" Form but have you modified
the Query being used as the RecordSource for the Subform) to include the
added Field [NutritionTest]?

--
HTH
Van T. Dinh
MVP (Access)



workingmom211 said:
I am using "order entry" that was in the sample database files. I have had
no
trouble with any of the other changes I have made, but this one I have
been
working on for days with no success.

I added a field to the table "orders" called "NutritionTest" caption
"NutritionTest", data type currency. I added it to the form "orders" by
dragging it from the "fields" window with the control source
"NutritionTest",
name "NutritionTest", default value "0".

I needed to add this total to 3 places. The two that worked are: in the
"orders" form "OrderTotal" and in the "Invoice" report "OrderTotal". I
simply added it with a +[NutritionTest] to the existing equation (with
line
total or subtotal, sales tax and freight charge).

Where it isn't working is: "Orders by Customer" form. Subform, orders by
customer subform. The text box is "total sale"

The equation there is:
=[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]+[NutritionTest],
- where I added the + [NutritionTest],but it gets the #name? error msg and
the #error for amount due (which gets its total from total sale). The
[FreightCharge] is in the same table "orders" and form "orders" as is
[NutritionTest] that I added, and the equation works without my addition.
This is only one of the two items I need to add, but until I get the first
one I can't add the second.

Thanks for any suggestions

I have tried using the expression editor and adding it by finding in below
in the forms folder and clicking on it in the <forms> column same problem.
 
Thanks for the help. I found how to do the query and that was the problem.
Fixed now.

Thanks again,
Terri
 
Back
Top