How is strData declared? If it's as a string, the only possibility is a
zero-length string (""), so you'd use
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9218-how-to-tell-if-string-missing.html
If Len(strData) > 0 Then
If it's declared as a variant, it could also be Null. The simplest check
would then be:
If Len(strData & "") > 0 Then
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9218
On the odd chance that the string might contain a number of blanks, you
could use the following instead:
If Len(Trim(strData)) > 0 Then
or
If Len(Trim(strData & "")) > 0 Then
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"AbraAbraCadabra"
wrote in message
news:O2RoO02cGHA.380@TK2MSFTNGP04.phx.gbl...
> How can I tell if a string is non-existent? If found this code on the
> web, but it doesn't seem to be working for me...What am I doing wrong?
>
> If Not IsMissing(strData) Then
> MsgBox "the variable exists"
> End If
>
>