PC Review


Reply
Thread Tools Rate Thread

Count query but needs to display 0

 
 
Simon
Guest
Posts: n/a
 
      14th Jan 2007
I have the following query that counts the brochure requests we have
had. It works fine but if we have not had any it does not dispay 0. how
do i make it dispaly 0

SELECT Count(tblBrochure.BrochureRequestID) AS CountOfBrochureRequestID
FROM tblBrochure;




Thanks

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      14th Jan 2007
That works fine for me with an empty table.

How are you displaying the value? If it's in a text box, might you have
formatting on that blanks 0 values?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Simon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have the following query that counts the brochure requests we have
> had. It works fine but if we have not had any it does not dispay 0. how
> do i make it dispaly 0
>
> SELECT Count(tblBrochure.BrochureRequestID) AS CountOfBrochureRequestID
> FROM tblBrochure;
>
>
>
>
> Thanks
>



 
Reply With Quote
 
=?Utf-8?B?U3BlZWR5?=
Guest
Posts: n/a
 
      15th Jan 2007
Try using the NVL function to tell it to bring a 0 back if there is no
value.example:

SELECT NVL(Count(tblBrochure.BrochureRequestID,O) AS CountOfBrochureRequestID

This works in other query languages, not sure it will work here.

> > FROM tblBrochure;



"Douglas J. Steele" wrote:

> That works fine for me with an empty table.
>
> How are you displaying the value? If it's in a text box, might you have
> formatting on that blanks 0 values?
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Simon" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I have the following query that counts the brochure requests we have
> > had. It works fine but if we have not had any it does not dispay 0. how
> > do i make it dispaly 0
> >
> > SELECT Count(tblBrochure.BrochureRequestID) AS CountOfBrochureRequestID
> > FROM tblBrochure;
> >
> >
> >
> >
> > Thanks
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a null value to display zero in count query kahaymon Microsoft Access Queries 1 22nd Jul 2008 10:08 PM
Display 0 Count on Query =?Utf-8?B?bW1hdHprZUBjb21jYXN0Lm5ldA==?= Microsoft Access Queries 3 5th Apr 2007 01:43 AM
Display the results of a count query =?Utf-8?B?QW5uZXR0ZQ==?= Microsoft Access 1 3rd Apr 2006 09:15 PM
How to display a count of zero from a query? =?Utf-8?B?TWlzdGVySA==?= Microsoft Access Queries 1 24th Feb 2006 06:57 PM
display a count in a query when null =?Utf-8?B?QmVu?= Microsoft Access 4 24th Jul 2005 01:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:33 PM.