[AccessD] A2K Reference the dot column property in a query

Gustav Brock gustav at cactus.dk
Mon Oct 20 04:46:30 CDT 2003


Hi John

> Since the function parameter is actually a variant (so that IsMissing will
> work), it can handle anything sent in, but that doesn't mean that it should
> be fed just anything.

> To me this is one of those gray areas where naming conventions just don't
> work as they should.  Yea, it's literally a variant, but it is expecting a
> long.  What should the name say, lng or var?

I think it should be a Variant for three reasons.

First, if you name it as, say, lng and you feed it a string by error,
this will not cause an error which it would if the parameter was a
true Long. I find it convenient that such errors are caught as early
as possible, indeed during development.

Second, if you use ByRef ...

Third, if your function only can or is supposed to handle certain
vartypes you will, as you know, have to trap other vartypes. Often you
will need nothing more than IsNumeric() or IsDate() - or even "On
Error Resume Next" - for that purpose.

/gustav



More information about the AccessD mailing list