issues with #error can't seem to supress it

sspreyer

Registered User.
Local time
Today, 03:41
Joined
Nov 18, 2013
Messages
251
issues with #error can't seem to suppress it

Code:
=[PaymentSearch subform].[Form]![Total]

tried 

=nz([PaymentSearch subform].[Form]![Total],0)
get !#size error
hi ,all

i wonder if someone could help me. I'm trying to suppress the #error when the total is null.

see above is what i have tried with no avail :banghead:

any help much appreciated

thanks in advance
Shane :cool:
 
Last edited:
A null total shouldn't cause an error. That reference does't look right. Try

Code:
=Forms![PaymentSearch subform].[Form]![Total]

and if that doesn't fix it could you upload your database? If not post the SQL of the subform record source query.
 
If Total is a control with a calculation and that calculation has an error then it would show up in this textbox too. Not knowing what Total is I refer you to this site as a long shot.
 
If Total is a control with a calculation and that calculation has an error then it would show up in this textbox too. Not knowing what Total is I refer you to this site as a long shot.

yeah this works on the sub form. but the calculation is being carried on to the main form i still get #error :confused:

working on subform
Code:
IIf(FormHasData([Form]),Sum([Job Cost]),0)
thanks

shane
 
what is the FormHasData function?

What are the parameters to the function (e.g. frm as form or something else)?

What is [Form] - is it a field name? supposed to refer to the form object?
where are you using this code as it is not clear. As written it should be in vba (in which case you use Me - not [Form], if the controlsource to a control it should be preceded with =

and

=nz([PaymentSearch subform].[Form]![Total],0)

would normally be written as

=nz([PaymentSearch subform].[Form].[Total],0)
 
i have now worked it out thanks guys

this is my solution

Code:
=IIf(Not IsError([PaymentSearch subform].[Form]![total]),[PaymentSearch subform].[Form]![total],0)
 

Users who are viewing this thread

Back
Top Bottom