Adding a calculation field to form

T

tdc01slm

I am trying to add a calculation field to a form in access. Trying to
calculate total number of cases ordered times total pounds per cases
with a grand total. The expression used is
=Sum([ORDER_CASE])*[JENPROD]![Gross Weight] but getting error message
The expression On Open you entered as the event property setting
produced the following error: The object doesn't contain the Automation
object 'JENPROD.'.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure]
*There may have been an erro evaluatin the function, event, or macro.

Any help that can be provided would be greatly appreciated.
Thank you.
 
M

Marshall Barton

tdc01slm said:
I am trying to add a calculation field to a form in access. Trying to
calculate total number of cases ordered times total pounds per cases
with a grand total. The expression used is
=Sum([ORDER_CASE])*[JENPROD]![Gross Weight] but getting error message
The expression On Open you entered as the event property setting
produced the following error: The object doesn't contain the Automation
object 'JENPROD.'.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure]
*There may have been an erro evaluatin the function, event, or macro.


It sounds like you tried to use the expression in a form
event property. A text box calculation must be in the text
box's Control Source property.

The Sum function is not especially useful unless the text
box is in a Group and/or the Report header/footer section.

The terms used in the Sum function, ORDER_CASE, **MUST** be
in the report's record source table/query. They can not be
controls on the report.

Try using:
=Sum([ORDER_CASE]) * [Gross Weight]
 

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