Counting Problem

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

Guest

I've used the following to count the number of records in my table:
DCount("*","Rooms") and it works great to give me a total of all the
barracks rooms we have. Now I need to count the number of rooms that are
empty and full. Easiest way to determine is if the "Last_Name" field is Null
or Not Null. Can anyone help with the formula? I've tried a couple and keep
getting errors.
Thanks!
Dan
 
Use your table name instead of Traver.

SELECT Count(Traver.Rooms) AS [Room Count], (SELECT Count([Rooms]) FROM
Traver WHERE [Last_Name] Is Null) AS Empty, (SELECT Count([Rooms]) FROM
Traver WHERE [Last_Name] Is Not Null) AS [Full]
FROM Traver;
 
Back
Top