Count qery but needs to display 0

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I am trying to get a query to work that will count how many people have
requested a brochure. If no brochure have been requested how in teh
query do u set the count to be 0

Thanks
 
me.fieldnameonform = dCount ("[fieldnameinquery]", "Query That Selects
Desired Records")

If the underlying table has an ID field then [fieldnameinquery] should
probably be [ID]

Ron
 
Your suggestion of ID is a good one, but DCount("*", ...) is usually best.

When you list a field, rather than *, DCount ignores any of the fields that
are Null.
 
Doublas, thank you for the insight. I knew (experience) that it
ignored null entries, The * sounds like a good solution.

Do you know if using * instead of a single always present field like
"ID" will go any slower in an MDB on a network, particularly on records
with many fields?

Ron
 

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

Similar Threads

Count query but needs to display 0 2
Query COunt 1
Making stuff visable or hiden 1
Ticking boxes with one button 2
Making sub reports invesible 1
.bro files 0
left join not working 2
multi-value field 1

Back
Top