Expression in Form

  • Thread starter Thread starter Fiona
  • Start date Start date
F

Fiona

I have a form where i need to put in an expression that
counts records that have a zero as their value. What is
the best way of doing this.
 
Hi,

the expression you need to use is

sum( iif( [field] = 0, 1, 0))

typically it is used to create a field in the query that populates the form.


HTH


MFK.
 
Many thanks that worked well. How would i do it for the
opposite to count the the records with a figure greater
than zero as their value.

Thanks.
-----Original Message-----
Hi,

the expression you need to use is

sum( iif( [field] = 0, 1, 0))

typically it is used to create a field in the query that populates the form.


HTH


MFK.

I have a form where i need to put in an expression that
counts records that have a zero as their value. What is
the best way of doing this.


.
 
Many thanks that worked well. How would i do it for the
opposite to count the the records with a figure greater
than zero as their value.

Thanks.
-----Original Message-----
Hi,

the expression you need to use is

sum( iif( [field] = 0, 1, 0))

typically it is used to create a field in the query that populates the form.


HTH


MFK.

I have a form where i need to put in an expression that
counts records that have a zero as their value. What is
the best way of doing this.


.

Just change the criteria to >0
 
Back
Top