Sum on Report based on String from Form (1 Viewer)

stu312

New member
Local time
Today, 06:08
Joined
Dec 11, 2013
Messages
2
I am new to access programming and I have a task where I need to get a Code which is a string from a form and then use it for generating a report which gives a sum of values within a period of time ( I have this in query by Between -And). I am trying to get the total of amount paid by a person. I have 6 columns where I have to get individual totals and then get a grand total.
I have a form which lists out the code options I would need on a combo-box.And then I am using a textbox to see if I am grabbing the code from form which happens to show up.

Now where I am stuck is at the totalling part . I have an IIF condition setup where I am comparing Code from table to the one I have in form. Say I have A,B,C,D as codes. And I have to total entire column in the table iff my code is 'A'. ( I will have values from A,B,C,D ) in my table. It gives me a !#type error.:banghead:
I am trying to invoke this report from a button in the form.

When I run report individually for every code .It works perfect. If I can get the form invoke these individual reports somehow that would help as well.

I have used the comparing to variable from report( like Reports!txtbxname!value) , tried directly accessing from form( Forms!FormName!cmbname).But nothing helps. I am a beginner, probably that might be a reason I have no clue where I am going wrong. Please help me.
 

Geotch

Registered User.
Local time
Today, 06:08
Joined
Aug 16, 2012
Messages
154
Can you upload a sample of the database?
 

Geotch

Registered User.
Local time
Today, 06:08
Joined
Aug 16, 2012
Messages
154
That's why I said a sample, not the entire data set.
 

Users who are viewing this thread

Top Bottom