troubleshooting Question

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

Avatar of wlwebb
wlwebbFlag for United States of America asked on
Microsoft Access
6 Comments1 Solution590 ViewsLast Modified:
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

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros