By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

strange function problem

P: n/a
Access 97. I have a function (called from a very large sub) where the
parameters are explicitly defined as double. However, on occasion one
or more of these may be null. My error trapping was set to "Break in
Class Module". When I have a null parameter, I don't receive any error
message but the code immediately stopped running at the point the
function was called. Anyone any ideas whats going on here??

May 19 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 19 May 2006 01:53:32 -0700, "shurstgbr"
<si*********@capcissystems.com> wrote:

If you want a trappable error, put an error handler in the sub, and
set that Error Trapping value to "Break on unhandled errors".
You will then get an "Invalid use of null". Only variants can have a
Null value.

-Tom.

Access 97. I have a function (called from a very large sub) where the
parameters are explicitly defined as double. However, on occasion one
or more of these may be null. My error trapping was set to "Break in
Class Module". When I have a null parameter, I don't receive any error
message but the code immediately stopped running at the point the
function was called. Anyone any ideas whats going on here??


May 19 '06 #2

P: n/a

What I actually want to know is why the code stops when it should carry
on.

May 19 '06 #3

P: n/a
"shurstgbr" <si*********@capcissystems.com> wrote in
news:11*********************@i39g2000cwa.googlegro ups.com:

What I actually want to know is why the code stops when it
should carry on.

Why do you believe that the code should carry on?

Note that an error passing incompatible parameters triggers the
error at the level of the call, not at the level of the function's
code.

The function is in a class module or is called from a class module.

--
Bob Quintal

PA is y I've altered my email address.
May 19 '06 #4

P: n/a
On 19 May 2006 08:50:37 -0700, "shurstgbr"
<si*********@capcissystems.com> wrote:

It can't. It cannot pass a Null value as an argument that is defined
as Double, because Null is not a valid Double.

-Tom.

What I actually want to know is why the code stops when it should carry
on.


May 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.