Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

#Error When using a subform field on a main form...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brook - 24 Nov 2005 06:22 GMT
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
Marshall Barton - 24 Nov 2005 06:44 GMT
>   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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.