In the control source of a text box i have the following code.
it displays the number of Line entries. The problem i am having is if there are no lines to count the text box is blank. Instead of being blank i would like it to display 0 but the code above does not work.
thanks ranman256 for the advice. I tried Dcount but have been struggling to get it to display 0 if the number of records is zero. The subform is based off an embedded query and i only need it to count records where a certain criteria is matched. I cant understand the syntax to be honest. I've tried looking online but still confused. Nz(Count([Line]),0) does work once there is more than one record to count, ideally i need it to display 0 if there are no records to count.
would you be able to help with the correct syntax for DCOUNT ? What information do you need?