Re: Trap for #Error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: 10/07/04


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 


Relevant Pages

  • [PATCH 37/39] move __get_user and __put_user into uaccess.h
    ... * Context: User context only. ... * data types like structures or arrays. ... * Returns zero on success, ...
    (Linux-Kernel)
  • [PATCH 26/39] merge getuser
    ... * Context: User context only. ... * This macro copies a single simple variable from user space to kernel ... * data types like structures or arrays. ... * Returns zero on success, ...
    (Linux-Kernel)
  • Re: No Records in Reports
    ... "Me" is the reference to the object ... >> want a 0 if there are no records in the subreport. ... >>>If you have No records in a Sub-Report how do you get the report to read ... >>>Zero in the amount field? ...
    (microsoft.public.access.gettingstarted)
  • Re: Changing criteria in queries
    ... This prevents dividing by zero and may eliminate the overflow. ... >> All this begs the serious issue of why you are changing data types. ... >> Tom Ellison ...
    (microsoft.public.access.queries)
  • Re: performing a "deep copy" on a nested structure
    ... I have the ff data types: ... calloc sets all bits zero which is not necessarily how a null pointer is represented ... I tend to reserve memmove for when it is legal for the source and destinations to overlap. ... I think your problem is probably that you have not yet understood that memmove and memcpy do NOT perform a deep copy. ...
    (comp.lang.c)