Make #Error go away

R

Ron

I have a form with a subform.

A textbox on the form takes subform.totalpaid and
subtracts it from [amountdue]. This works fine except
when a customer hasn't made a payment, then the textbox
gives you #Error (because there is no value in the
subform).

I have been trying to blank out the #Error through
various methods, without success.

I have tried "iif"s within the text box control source.
I've tried VB code on the form itself (such as trying to
use "hasdata" to set visible property for the text box).

The textbox control source doesn't like "hasdata"
and "null" doesn't cover this situation.

Ideas?
 
S

StCyrM

Hi Ron

Try using the NZ function as follows:

for example:
=NZ(TotalPaid,0)

Maurice
 

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