Label not showing on subform if value is 0 (2 Viewers)

Local time
Today, 15:29
Joined
Dec 10, 2024
Messages
61
Hi
I have created a small dashboard showing certain statistics of my business. This is comprised of small subform squares on my main menu. These subforms are based off queries, and the forms control performs a count or totals this various data. Attached screenshot 1 showing a blank subform, 2 showing it displaying when there is returned results in the query.

The issue I have is when there is nothing to count i.e no collections for example the form becomes completely blank. I would like the label to still appear and show 0 rather than just be blank.

I tried to add an IsNull IIF statement to the control which would show 0 instead of nothing but this doesn't work.
e.g

=IIf(IsNull(Count(([JobID]))),0,(Count([JobID])))

I've tried to add another label into the form as a test, and even this doesn't show if the query returns no results.

Also I've added an on click event to each of the subforms which loads a particular report to elaborate on the information. If the subform is blank the report opens, but if the subform has data clicking it does nothing. Why would this be?
 

Attachments

  • 1.jpg
    1.jpg
    83.3 KB · Views: 7
  • 2.png
    2.png
    48.3 KB · Views: 4
Is the label on the subform in the header or detail section? I would first make sure it’s in the subform header.
 
I would not have thought Count() would return Null, but zero?
 

Users who are viewing this thread

Back
Top Bottom