Code to display total items?

GregSmith

Registered User.
Local time
Today, 17:30
Joined
Feb 22, 2002
Messages
126
I have a query that contains all my information for the different sites. What I would like is to have a text box display the total number of the routers listed in the item field.

The item field contains entries like routers, servers, remote sites. I just want to display the total # from the routers.
 
Do another query (using the original query as the source). Bring down the Item field into the design grid. Click on the aggregate function symbol at the top (looks something like "E".)

In the criteria section of the Item field, type in "Routers" and use "Group By" in the Total Row. Create a new column in the query by typing in Routers: (Count([Item]). In the Total Row, select Expression.

The new query will give you two fields when you run it. One will be named Item and will have "Routers" in the field and the other will be titled Routers and will have the count of Routers.

HTH
 

Users who are viewing this thread

Back
Top Bottom