Lanason Registered User. Local time Today, 13:14 Joined Sep 12, 2003 Messages 258 Jan 13, 2015 #1 I'm doing a number of queries to get the number of records that meet the criteria in a certain table. However if the number is zero then i get Null and the code bums out. Any idea how to make the null as zero?
I'm doing a number of queries to get the number of records that meet the criteria in a certain table. However if the number is zero then i get Null and the code bums out. Any idea how to make the null as zero?
C CJ_London Super Moderator Staff member Local time Today, 13:14 Joined Feb 19, 2013 Messages 17,563 Jan 13, 2015 #2 use the nz function nz(mynum,0)
B ButtonMoon Registered User. Local time Today, 13:14 Joined Jun 4, 2012 Messages 305 Jan 13, 2015 #3 Lanason said: I'm doing a number of queries to get the number of records that meet the criteria in a certain table. However if the number is zero then i get Null and the code bums out. Any idea how to make the null as zero? Click to expand... Use COUNT(*) to return the number of rows in a query. COUNT(*) should never return zero. It always returns a whole number greater than or equal to zero.
Lanason said: I'm doing a number of queries to get the number of records that meet the criteria in a certain table. However if the number is zero then i get Null and the code bums out. Any idea how to make the null as zero? Click to expand... Use COUNT(*) to return the number of rows in a query. COUNT(*) should never return zero. It always returns a whole number greater than or equal to zero.
C CJ_London Super Moderator Staff member Local time Today, 13:14 Joined Feb 19, 2013 Messages 17,563 Jan 13, 2015 #4 see post #2