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
|
|||
|
|||
Why won't the Nz function work?
I am trying to set up controls on a form that will return the count and the sum of values in a subform and show 0 if there are no records in the subform. I set up controls in the form footer of the subform using (for example) Nz(Sum([Cost],0). This returns an accurate sum of the cost field if there are records in the subform, but the field seems to be null if there are no records in the subform. I have done the exact same thing in a different set of forms and subforms in a different database, and it works there; but I cannot get it to work in this one. It's driving me straight up the nearest wall. Anybody have any ideas?
|
#2
|
|||
|
|||
Why won't the Nz function work?
Try: Sum(Nz([Cost]))
"ABaggott" wrote in message ... I am trying to set up controls on a form that will return the count and the sum of values in a subform and show 0 if there are no records in the subform. I set up controls in the form footer of the subform using (for example) Nz(Sum([Cost],0). This returns an accurate sum of the cost field if there are records in the subform, but the field seems to be null if there are no records in the subform. I have done the exact same thing in a different set of forms and subforms in a different database, and it works there; but I cannot get it to work in this one. It's driving me straight up the nearest wall. Anybody have any ideas? |
#3
|
|||
|
|||
Why won't the Nz function work?
I think TPratt meant:
Sum(Nz([Cost], 0)) Regards, Graham R Seach Microsoft Access MVP Sydney, Australia Microsoft Access 2003 VBA Programmer's Reference http://www.wiley.com/WileyCDA/WileyT...764559036.html "TPratt" wrote in message ... Try: Sum(Nz([Cost])) "ABaggott" wrote in message ... I am trying to set up controls on a form that will return the count and the sum of values in a subform and show 0 if there are no records in the subform. I set up controls in the form footer of the subform using (for example) Nz(Sum([Cost],0). This returns an accurate sum of the cost field if there are records in the subform, but the field seems to be null if there are no records in the subform. I have done the exact same thing in a different set of forms and subforms in a different database, and it works there; but I cannot get it to work in this one. It's driving me straight up the nearest wall. Anybody have any ideas? |
Thread Tools | |
Display Modes | |
|
|