Count Question

  • Thread starter Thread starter Sar
  • Start date Start date
S

Sar

Not sure if this is possible to accomplish with one
query, but here goes.
I inherited a type of permit application table. This
table contains the following fields:

Field Name Data Type
Township Text
PermNum Text (Permit Number)
House Text
Sewer Text
Deck Text
BldgFee Currency
VAFee Currency
SAFee Currency

For different types of Applications, users have been
prefacing the Application number with alpha characters
such as ZP, VA, SU (both the Alpha and the numeric
characters have been entered into the PermNum field, so
for example, this field might contain a value such as
ZP04-135)

We need to have a query that will count the number of
ZP, VA and SA Permit Numbers broken out by each
township.

The query also needs to sum the BldgFee, VAFee and SAFee
for each township.

I've been able to figure out how to sum the Fees, grouped
by Township, but I'm stuck on trying to pull a count of
the different types of Permit Numbers by townships, for
example, a count of all the ZP Permits for Township A.
Is this even possible to do in a single query.

TIA
 
First, in the query, create a new field that has nothing.
Type this into it:

Expr1: mid([PermNum],1,2)

then in the criteria for that field you can type "ZP"
which will get you all the info you need for that area
and so on.

Hope that will get you started.
 
I think you can create a Calculated Field in your Query
like:

AppType: Left([PermNum], 2)

and then use this in your 'Group By'.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top