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 / April 2008

Tip: Looking for answers? Try searching our database.

#error propogation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JimS - 24 Apr 2008 16:02 GMT
On a subform, I have a textbox that sums a column. I don't display it, just
reference it.

When the subform recordset is empty, it propogates "#error" to all the text
boxes that reference it. How do I get it to calculate out to a zero or null
instead of #error?

subform text box control source: =Sum(-nz([Value],0))

I know, "Value" is a bad choice for a column name. I'll fix it later.

Jim
Signature

Jim

Jeanette Cunningham - 24 Apr 2008 22:20 GMT
Jim,
have a look at this page on the access web.

http://www.mvps.org/access/forms/frm0022.htm

Jeanette Cunningham

> On a subform, I have a textbox that sums a column. I don't display it,
> just
[quoted text clipped - 11 lines]
>
> Jim
JimS - 24 Apr 2008 22:39 GMT
Thank you, Jeanette. I bludgeoned it to death by setting the text boxes that
refer to the subform as follows:

=IIf(sfmAllPCardTab.Form.recordset.RecordCount>0,sfmAllPCardTab.Form!PCARD,0)

Not at all elegant,but it worked. I appreciate your reply, which itself is
not particularly elegant, but has the advantage of having been tested.  
Thanks again.
Signature

Jim

> Jim,
> have a look at this page on the access web.
[quoted text clipped - 18 lines]
> >
> > Jim
Jeanette Cunningham - 24 Apr 2008 22:49 GMT
Jim,
the advantage of using the Nnz function is that you can save it as a public
sub in a module and easily call it to use on any form.
It is a lot less typing (bludgeoning to death!).

Jeanette Cunningham

> Thank you, Jeanette. I bludgeoned it to death by setting the text boxes
> that
[quoted text clipped - 28 lines]
>> >
>> > Jim
 
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.