good day all...
I have an invoices form that I am using the following controls, however,
if the controls have no data, the control shows #Error... is there a way to
prevent this?
Payoff =IIf([NewAmountDue]=0,"Payoff Date","Last Payment Date")
PaymentDate =frminvoicepaymentssubform.Form!LastPaymentDate
NewAmountDue=frminvoicepaymentssubform.Form!MaxPaymentAmount
Any suggestions greatly appreciated ...
thanks...
Brook
> I have an invoices form that I am using the following controls, however,
>if the controls have no data, the control shows #Error... is there a way to
[quoted text clipped - 5 lines]
>
>NewAmountDue=frminvoicepaymentssubform.Form!MaxPaymentAmount
You can use the IsError function to test for that situation.
It looks intimidating with those long names, but the idea is
simple:
=IIf(IsError(frminvoicepaymentssubform.Form!LastPaymentDate),
0, frminvoicepaymentssubform.Form!LastPaymentDate)
Note that in a report-subreport scenario, you can use the
HasData property instead:
=IIf(rptinvoicepaymentssubreport.Report!LastPaymentDate.HasData,
rptinvoicepaymentssubreport.Report!LastPaymentDate, 0)

Signature
Marsh
MVP [MS Access]
Brook - 24 Nov 2005 07:06 GMT
Perfect!!!
Thank you so much...
I used the following:
=IIf(IsError(frminvoicepaymentssubform.Form!LastPaymentDate), 0,
frminvoicepaymentssubform.Form!LastPaymentDate)
Brook
> > I have an invoices form that I am using the following controls, however,
> >if the controls have no data, the control shows #Error... is there a way to
[quoted text clipped - 19 lines]
> =IIf(rptinvoicepaymentssubreport.Report!LastPaymentDate.HasData,
> rptinvoicepaymentssubreport.Report!LastPaymentDate, 0)