We help IT Professionals succeed at work.
Get Started

Access - #Error when Control Source formula has a blank subform value

wlwebb
wlwebb asked
on
584 Views
Last Modified: 2012-08-14
I have a tabbed form that on one of the tabs I have 4 subforms.  On the tabbed form I have a textbox to display for the user the % Complete that a Job is by comparing the Total Actual Cost vs the Total Estimated Cost.

I am taking a textbox totals field of one subform and using it to compute a % of completion from a textbox totals field from another subform.

When one of the subforms is blank (ie: no costs have been input on a job yet) then I get #Error.

I have tried IIF() statements and Error$ to get it to display as 0% when it is computing #Error.  I can not get the syntax correct.

Below is my formula.  What do I change to get it to display as 0% if it is in #Error?
=Nz([sfrmJobSummaryItemTotalsOnly].[Form]![txtTotalAllItems]/[sfrmJCJobEstimateEstimatedCosts].[Form]![Item Cost Estimate],0)

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2011
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE