View Single Post
  #2  
Old February 27th, 2008, 05:45 PM posted to microsoft.public.access
fredg
external usenet poster
 
Posts: 4,386
Default "Count" expression in report

On Wed, 27 Feb 2008 09:31:04 -0800, Trying wrote:

Hi
I have a field, named [Type].
In a report, what is the expression to count this field ´[Type]ˇ where
Type=Truck
??? =Count([Type]) where type = ´Truckˇ
Thanks


I would strongly suggest that you not use the word 'Type' as a field
name. Type is a reserved Access keyword and refers to an Access Field
property. For more information see:
http://www.allenbrowne.com/Ap****ueBadWord.html

To answer your question....
=Sum(IIf([TypeField] = "Truck",1,0)
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail