Cumulative Error

A

andrew3254

Ill try and explain this as best I can.

I have a form with a subform, the subform contains all the data, the main
form is used as a connection link.

On the subform I want to create a cumulative total specific to the project
and department according to month so essentially I want something like:

(Main Form: Frm_Edit Department Detailed)
Project: A
Department: 0004

(Main Form: Frm_Edit Department Sub)
Month Planned Cumulative
June 342 342
Jul 123 465
Aug 456 921


At the moment I have the following as the control source for cumulative but
it doesnt seem to like it I just get #error

=DSum("[Planned]","[Tbl_Department Detailed]","Month <= [Forms]![Frm_Edit
Department Sub]![Month] AND [Project Number] = [Forms]![Frm_Edit Department
Detailed] ANd Discipline=[Forms]![Frm_Edit Department Detailed]!Discipline")
 
S

scubadiver

Have you tried using that code in a query and basing the subform on that?
Then you can make it read only and the fields will be updated.

I am wondering whether you have the speech marks in the wrong place. The
following works in a very simple query.

DSum("[cost]","[table1]","rec<=" & [rec])
 
A

andrew3254

--
Thank you




scubadiver said:
Have you tried using that code in a query and basing the subform on that?
Then you can make it read only and the fields will be updated.

I am wondering whether you have the speech marks in the wrong place. The
following works in a very simple query.

DSum("[cost]","[table1]","rec<=" & [rec])

--
www.ae911truth.org



andrew3254 said:
Ill try and explain this as best I can.

I have a form with a subform, the subform contains all the data, the main
form is used as a connection link.

On the subform I want to create a cumulative total specific to the project
and department according to month so essentially I want something like:

(Main Form: Frm_Edit Department Detailed)
Project: A
Department: 0004

(Main Form: Frm_Edit Department Sub)
Month Planned Cumulative
June 342 342
Jul 123 465
Aug 456 921


At the moment I have the following as the control source for cumulative but
it doesnt seem to like it I just get #error

=DSum("[Planned]","[Tbl_Department Detailed]","Month <= [Forms]![Frm_Edit
Department Sub]![Month] AND [Project Number] = [Forms]![Frm_Edit Department
Detailed] ANd Discipline=[Forms]![Frm_Edit Department Detailed]!Discipline")
 

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