Redundency of IsNull(Trim(myvar)) ?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: JC (nospam_at_here.com)
Date: 05/20/04


Date: Thu, 20 May 2004 11:48:25 -0700

Hi,

I am wondering if the following two statements always yield the same
results:

1) If IsNull(Trim(myVariable)) Then [...]

2) If IsNull(myVariable) Then [...]

Basically, if myVariable is Null, then won't Trim(myVariable) also be Null?
Are there any instances when I would want to leave the Trim() function in
the above statement?

Also, are the answers to these questions dependent on which VBA platform is
used (i.e. VB6 vs. VBScript)?

Thanks in advance!

JC