Query to count records in a table

M

Marco

Hi. I need to creat a query to count how many records I have in a table
according to a specific criteria.

How?? When I insert a criteria que query return zero results. Why?

Regards,
Marco
 
M

Michel Walsh

You can use DCount:

? DCount("*", "TableNameHere", "fieldNameHere =1056" )


should return the number of records where the field holds the integer value
of 1056.


You can also use a query. Its SQL statement, in SQL view, could take a look
similar to:


SELECT COUNT(*)
FROM tableNameHere
WHERE fieldNameHere= 1056



What is your SQL statement (in SQL view of the query) ?




Hoping it may help,
Vanderghast, Access MVP
 
J

Jerry Whittle

Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top