Henley12 Troy University Fan Local time Today, 07:29 Joined Oct 10, 2007 Messages 222 May 21, 2008 #1 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 do I get rid of the #error when I am trying to pull a total from a subform, but the subform has no records?
ErikSnoek Programmer Local time Today, 05:29 Joined Apr 26, 2007 Messages 100 May 21, 2008 #2 How are you getting the total? With Sum? Because then it shouldn't give #Error but just.. emptiness.
Henley12 Troy University Fan Local time Today, 07:29 Joined Oct 10, 2007 Messages 222 May 21, 2008 #3 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.
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.
ErikSnoek Programmer Local time Today, 05:29 Joined Apr 26, 2007 Messages 100 May 21, 2008 #4 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)
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)
Henley12 Troy University Fan Local time Today, 07:29 Joined Oct 10, 2007 Messages 222 May 21, 2008 #5 That gives me an invalid syntax.
Henley12 Troy University Fan Local time Today, 07:29 Joined Oct 10, 2007 Messages 222 Jun 3, 2008 #6 Any ideas on this problem? I am still getting #error when there are no subform records.