If THen Statement in Access Report

Nokose

New Member
Joined
Feb 13, 2009
Messages
23
I am working on a system and running short on time. I trying to get a piece of an invoice to work correctly here is the scenerio...

We will be holding a silent auction. Before this auction we will have a gambling event, half of the winnings for that can be applied to the silent auction. I have the winnings in the system under a table called winning. Now on the report I have the Silent Auction Totals coming up under a group called silent auction. How can I get the system to realize if they have won something under the silent auction then pull there winnings and divide that in half. If they do not have silent auction items it will not show winnings.

I have started with the function below:

=IIf([Group]="Silent Auction",[Winnings]/2,0)

However it is not reading correctly if there is even 1silent auction item on the invoice. It reads the first line which reads purchases and does not look for anything on the page to be Silent Auction.

Any help would be appreciated.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Access doesn't calculate if any of the fields is Null (blank). To get around that, use the NZ() function to convert Null to zero --
=IIf([Group]="Silent Auction",NZ([Winnings])/2,0)

Denis
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,891
Members
449,058
Latest member
Guy Boot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top