On Thu, 13 Apr 2006 16:26:54 GMT,
corepaul@aol.com wrote:
[color=blue]
> I am using Acess 2000 and Windows 2000.
>
> I have a form with a text box txLName. tStrGlobal As String is dimensioned
> globally. The first time I enter the text box, the Enter event with the code
>
> If txLName.Value = Null Then
> tStrGlobal = ""
> Else
> tStrGlobal = txLName.Value ' error occurs in this line
> End If
>
> causes an "Invalid use of null" error in the assignment statement after the
> Else statement. Why doesn't the If statement correctly detect the Null?
>
> The following code works fine
>
> If txLName.Value <> Null Then
> tStrGlobal = txLName.Value
> Else
> tStrGlobal = ""
> End If
>
> I'm not stuck, so please reply at your convenience. I'm just trying to
> better understand how Access works. I'm a relative newbie.
>
> Paul Core
>
> ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
>
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
> ---= East/West-Coast Server Farms - Total Privacy via Encryption =---[/color]
Use:
If IsNull(txLName) Then
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail