View Full Version : Darn NULL Problem!!! Please Help


pcdummy
05-16-2001, 08:36 PM
Hello. Someone please help..... I have an unbound text box on a subform which is created from a paramater query.. Quite simply the text box is a counter for the number of records returned from the query. I have the unbound text box placed within the footer, as was told is good practice. Every thing works fine as long as the query returns one or more records; however i would like to return "0" no qutoes., when no records are retrieved.

My unbound text box data source is as follows:

=Count([Message_ID])
Have tried this, to no avail
=Nz(Count[Message_ID],0) also tried
=Nz((Count[Message_ID]),0)
Nothing seems to work also have tried several Iif statements as well. Anyone have any suggstions. ... ALso would like to call this same field from a different form, can call fine and again as long as not null everything works fine....but when null....##ERRRORRRRRRRR.... please help the weak and distressed.

Jim Bulger
05-17-2001, 02:42 AM
=Count(Nz([Message_ID],0))

pcdummy
05-17-2001, 05:14 AM
Thanks for the quick reply but that doesn't seem to work either... Someone please point me in the right direction....


Sincerely,

Jeff

pcdummy
05-17-2001, 04:01 PM
pleaseeeeeee help.... Time Bomb Ticking!!!

MarionD
05-18-2001, 05:12 AM
Try the iif:

iif(Count[Message_ID])>0;Count([Message_ID);0)

Means if the count is >0 then display the count, else display a 0.

Hope this works for you.


[This message has been edited by MarionD (edited 05-18-2001).]

[This message has been edited by MarionD (edited 05-18-2001).]

pcdummy
05-18-2001, 10:21 AM
Thanks Marion will try that right away. I really appreciate your time in helping me with this matter.....


Best Regards,

Jeff