lovelykid23
New member
- Local time
- Today, 15:32
- Joined
- Aug 10, 2016
- Messages
- 8
Hi guys,
I'm using some functions to build a report for my database. However, I got stuck at this one function.
So I created an unbound text box and add this function.
Technically, there are 6 groups of data: Home, Business, Daycare, School, Health Department and Other. These are divided further into groups with data >8, <8 and <=4, <4 and >0, and else.
I need to find percentage. So I created a function for the Other section that supposedly says if the total number of records that are not Home, Business, Daycare, School and Health Department is bigger than 0, then sum of the number of records of [Other>8] + [Other >=8 and <4] divide for the sum of number of records that are Other (which means they are not Home, Business, Daycare, School and Health Department) and they also need to be >8 or <=8 and >0.
I wrote this function
But Access keeps saying that the expression I entered has a function that containing wrong number of argument. What did I do wrong? How can I fix it?
Thank you very much guys
I'm using some functions to build a report for my database. However, I got stuck at this one function.
So I created an unbound text box and add this function.
Technically, there are 6 groups of data: Home, Business, Daycare, School, Health Department and Other. These are divided further into groups with data >8, <8 and <=4, <4 and >0, and else.
I need to find percentage. So I created a function for the Other section that supposedly says if the total number of records that are not Home, Business, Daycare, School and Health Department is bigger than 0, then sum of the number of records of [Other>8] + [Other >=8 and <4] divide for the sum of number of records that are Other (which means they are not Home, Business, Daycare, School and Health Department) and they also need to be >8 or <=8 and >0.

I wrote this function
=IIf(Sum(IIf([Ordering kit for?]<>"Home" And [Ordering kit for?]<>"Business" And [Ordering kit for?]<>"Daycare" And [Ordering kit for?]<>"School" And [Ordering kit for?]<>"Health Department",IIf(Val([Test Kit Result])>8 Or Val([Test Kit Result])<=8 And Val([Test Kit Result])>0,1,0),0))>0,( Sum(IIf(Val([Test Kit Result])>8,1, IIf(Val([Test Kit Result])<=8 and Val([Test Kit Result])>4, 1, IIf(Val([Test Kit Result])<=4 and Val([Test Kit Result])>0,1,0),0),0)) / Sum(IIf([Ordering kit for?]<>"Home" And [Ordering kit for?]<>"Business" And [Ordering kit for?]<>"Daycare" And [Ordering kit for?]<>"School" And [Ordering kit for?]<>"Health Department",IIf(Val([Test Kit Result])>8 Or Val([Test Kit Result])<=8 And Val([Test Kit Result])>0,1,0),0))),0)
But Access keeps saying that the expression I entered has a function that containing wrong number of argument. What did I do wrong? How can I fix it?
Thank you very much guys