Query to count records in a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Show us the SQL. Open the query in design view. Next go to View, SQL View
and copy and past it here.
 
Back
Top