> I have a feild that I would like to count the 0 or less on the form header.
> I know that if I would like to count all records it would be count (*). I
> dont know what code to put in the ( ). The feild name is net.
>
> Any help would be great. Thanks
Raoul,
I'm feeding the form with a Query "DEP_Vol_Numbers". I have this Query do
the following to give me the net feild.
Net: CDbl(Nz([Total Of DEPInDate],0))-CDbl(Nz([Total Of Loss FY],0))
So if no data is found then I get a 0 or it could be a negitive number. I
would like the text box to cound the 0 or less numbers.
> 2 examples:
>
[quoted text clipped - 14 lines]
> >
> > Any help would be great. Thanks
JaRa - 30 Mar 2005 14:03 GMT
this?
SELECT Count(*) FROM Dep_Vol_Numbers WHERE Net<=0
- RAoul
> Raoul,
>
[quoted text clipped - 24 lines]
> > >
> > > Any help would be great. Thanks
Ronald W. Roberts - 30 Mar 2005 22:10 GMT
>Raoul,
>
[quoted text clipped - 30 lines]
>>>
>>>
Dim x as integer
x=Dcount("[Net]", "DEP_Vol_Numbers", "[Net] <1")
It makes no difference what you use in the first Parameter. You want to
count the number of records
that contain 0 or less in the Net field.
So, you could do something like:
x=Dcount("[Name of any field in your record]", "DEP_Vol_Numbers", "[Net]
< 1")
Ron

Signature
Ronald W. Roberts
Roberts Communication
rwr@robcom.com