Problem with subform control

T

Tony Williams

I have a form which has two subforms. The subforms are populated from
queries which are based on a 4 tables. On my main form I have a control
"Total Expenses2" that is populated from the value of a control on one of my
subforms using this as the control source
=IIf([Print Invoice Expenses Subform].Form![Total Expenses]=0,0,[Print
Invoice Expenses Subform].Form![Total Expenses])
If there is no data in any of the controls the sub form I'm trying to
populate the control "Total Expenses" with "0" but I get #Error I've tried
using
=IIf(Nz([Print Invoice Expenses Subform].Form![Total Expenses]),0,[Print
Invoice Expenses Subform].Form![Total Expenses]) but that didn't work either
can anyone help? How do I make my field 0 if there are no records in my
subform?
Thanks
Tony
 
T

Tony Williams

Sorry should have read
If there is no data in any of the controls the sub form I'm trying to
populate the control "Total Expenses2" with "0"
Thanks
Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top