Re: Trap for #Error
From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: 10/07/04
- Next message: Allen Browne: "Re: Conditional Page Breaks"
- Previous message: Duane Hookom: "Re: Trap for #Error"
- In reply to: Alan Fisher: "Trap for #Error"
- Next in thread: Alan Fisher: "Re: Trap for #Error"
- Reply: Alan Fisher: "Re: Trap for #Error"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 7 Oct 2004 12:24:56 +0800
If the fields are Null, you would expect the result to be Null, not #Error.
The best solution will be to understand what is causing the error. For
example, if you refer to a text box in a subreport and the subreport has no
data, you get #Error because you referred to a non-existent text box. If you
divide anything by zero, you get #Error. If the data types do not match, you
can get #Error.
You can convert nulls to zero with Nz(), but I don't believe that will solve
this problem. Post back with more information about the ControlSource of the
3 text boxes if you are still stuck.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Alan Fisher" <anonymous@discussions.microsoft.com> wrote in message news:0dcf01c4abca$997631a0$a401280a@phx.gbl... >I have a field that adds two other fields. When one or > both of the other two fields are null I get an #Error in > the block as Expected. I would like to trap for this so I > can display an alternate text box instead. I have seen it > done before but can't find it. Thanks for any help. Alan
- Next message: Allen Browne: "Re: Conditional Page Breaks"
- Previous message: Duane Hookom: "Re: Trap for #Error"
- In reply to: Alan Fisher: "Trap for #Error"
- Next in thread: Alan Fisher: "Re: Trap for #Error"
- Reply: Alan Fisher: "Re: Trap for #Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|