A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#error propogation



 
 
Thread Tools Display Modes
  #1  
Old April 24th, 2008, 04:02 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default #error propogation

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
--
Jim
  #2  
Old April 24th, 2008, 10:20 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default #error propogation

Jim,
have a look at this page on the access web.

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


Jeanette Cunningham


"JimS" wrote in message
...
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
--
Jim



  #3  
Old April 24th, 2008, 10:39 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default #error propogation

Thank you, Jeanette. I bludgeoned it to death by setting the text boxes that
refer to the subform as follows:

=IIf(sfmAllPCardTab.Form.recordset.RecordCount0,s fmAllPCardTab.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.
--
Jim


"Jeanette Cunningham" wrote:

Jim,
have a look at this page on the access web.

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


Jeanette Cunningham


"JimS" wrote in message
...
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
--
Jim




  #4  
Old April 24th, 2008, 10:49 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default #error propogation

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


"JimS" wrote in message
...
Thank you, Jeanette. I bludgeoned it to death by setting the text boxes
that
refer to the subform as follows:

=IIf(sfmAllPCardTab.Form.recordset.RecordCount0,s fmAllPCardTab.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.
--
Jim


"Jeanette Cunningham" wrote:

Jim,
have a look at this page on the access web.

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


Jeanette Cunningham


"JimS" wrote in message
...
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
--
Jim






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.