#Error in field when subform has no records

Henley12

Troy University Fan
Local time
Today, 00:24
Joined
Oct 10, 2007
Messages
222
How do I get rid of the #error when I am trying to pull a total from a subform, but the subform has no records?
 
How are you getting the total? With Sum? Because then it shouldn't give #Error but just.. emptiness.
 
I have a field on the subform which sums the total time of the records. I then have a field on the main form that references the field on the subform. When there are no records in the subform, the main form field says #error.
 
Strange, I recreated that scenario in my test database and the field just gets empty when there are no records. But hmm.. perhaps this might work?
Code:
=nz(frmYourSubform.Form!txtYourTextbox;0)
 
Any ideas on this problem? I am still getting #error when there are no subform records.
 

Users who are viewing this thread

Back
Top Bottom