You sure mUncompressedSnapFile is a string, and not a variant?
When it's possible that a value could be either a zero-length string ("") or
Null, it's more efficient to use
If Len(mUncompressedSnapFile & vbNullString) > 0 Then
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12040
than
If Not IsNull(mUncompressedSnapFile) Then
If Len(mUncompressedSnapFile) > 0 Then
or
If Not IsNull(mUncompressedSnapFile) Then
If mUncompressedSnapFile <> "" Then
In other words, what Stephen's doing there is making sure that
mUncompressedSnapFile contains a non-blank string.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Peter Hibbs"
wrote in message
news:59E4A3FA-2027-485C-800E-D45D69A775B1@microsoft.com...
> Hi All
>
> I recently downloaded some code from Stephen Lebans Web site to convert
> Access reports into PDF files (which is brilliant by the way). I noticed
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12040
> that
> the following code snippet is used occasionally :-
>
> If Len(mUncompressedSnapFile & vbNullString) > 0 Then
>
> I don't quite understand the reason for the vbNullString in this code,
> could
> anyone explain it. The variable 'mUncompressedSnapFile' is a normal string
> variable.
>
> --
> Peter Hibbs