Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

DCount and NZ

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 29 Jul 2005 18:46 GMT
I tried both of these expressions to get a 0 when there are no
records...neither works.  Any suggestions?

=NZ(DCount([SalesID],"UnPaidChxQ"),0)
Text10=NZ(DCount([SalesID],"UnPaidChxQ"),0)

Thanks
DS
Klatuu - 29 Jul 2005 19:09 GMT
I'm not sure what you are trying to do.  They way your code is structured,
the only time you will get 0 is when there are no records in the table at
all.  You don't have criteria defined.

> I tried both of these expressions to get a 0 when there are no
> records...neither works.  Any suggestions?
[quoted text clipped - 4 lines]
> Thanks
> DS
DS - 29 Jul 2005 20:01 GMT
> I'm not sure what you are trying to do.  They way your code is structured,
> the only time you will get 0 is when there are no records in the table at
[quoted text clipped - 8 lines]
>>Thanks
>>DS

Thats it, Whenever I don't hae any records I want a Zero.
Thanx
DS
Marshall Barton - 29 Jul 2005 19:17 GMT
>I tried both of these expressions to get a 0 when there are no
>records...neither works.  Any suggestions?
>
>=NZ(DCount([SalesID],"UnPaidChxQ"),0)
>Text10=NZ(DCount([SalesID],"UnPaidChxQ"),0)

There must be something else going on.  I always get a zero
when there are no records.  Whatever it is, I can't see it
in your posted expression.

Note that the Nz is unnecessary with DCount.

Signature

Marsh
MVP [MS Access]

DS - 29 Jul 2005 20:03 GMT
>>I tried both of these expressions to get a 0 when there are no
>>records...neither works.  Any suggestions?
[quoted text clipped - 7 lines]
>
> Note that the Nz is unnecessary with DCount.

Thanks, I changed my Query around and that worked.  It was an incorrect
join.
Once again everyone, Thank You!
DS
Jörg Ackermann - 29 Jul 2005 19:20 GMT
Hi,

DS schreibselte:

> I tried both of these expressions to get a 0 when there are no
> records...neither works.  Any suggestions?
[quoted text clipped - 4 lines]
> Thanks
> DS

Try:

=DCount("*","UnPaidChxQ")

or

DCount("SalesID","UnPaidChxQ")

Acki
DS - 29 Jul 2005 20:03 GMT
> Hi,
> DS schreibselte:
[quoted text clipped - 17 lines]
>
> Acki
Thanks, see previous post.
DS
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.