If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
No Value returning from query
I have a query that sums a particular field as part of the query. Sometimes
there is not any data to sum and so no value is returned in the sum line. Is there a way to return a zero (0) value in these instances? Thanks for your help. Brennan |
#2
|
|||
|
|||
No Value returning from query
Check out the NZ function. In a query something like this:
Expr1: NZ([FieldName],0) -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Brennan" wrote: Community Message Not Available |
#3
|
|||
|
|||
No Value returning from query
Thanks Jerry for your quick response. I have tried using the Nz function
without success. Will that return a "0" value even if the normal query does not return anything? I am trying to find this out, because sometimes there is data that will return, but other times there is not. Thanks |
#4
|
|||
|
|||
No Value returning from query
Nz only works if there is a record returned. Nz works at the field level
not at the record level (when you are using it in a query). '================================================= === John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University of Maryland Baltimore County '================================================= === Brennan wrote: Thanks Jerry for your quick response. I have tried using the Nz function without success. Will that return a "0" value even if the normal query does not return anything? I am trying to find this out, because sometimes there is data that will return, but other times there is not. Thanks |
Thread Tools | |
Display Modes | |
|
|