[AccessD] compare nulls

Mark A Matte markamatte at hotmail.com
Wed Jan 17 12:12:20 CST 2007


Thanks Dan,

That would need other If statements because I needed to know if the 2 were 
equal...the nulls just caused a problem.  I solved it with gustav's 
suggestion:
>If nz(text1) = nz(text2) then
>	Do this
>Else
>	Do that
>End If

Thanks Again,

Mark A. Matte

>From: "Dan Waters" <dwaters at usinternet.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "'Access Developers discussion and problem 
>solving'"<accessd at databaseadvisors.com>
>Subject: Re: [AccessD] compare nulls
>Date: Wed, 17 Jan 2007 10:58:42 -0600
>
>Hi Mark,
>
>Would this work?
>
>If IsNull(txt1) and IsNull(txt2) Then
>	Do this
>Else
>	Do that
>End If
>
>
>Dan Waters
>
>-----Original Message-----
>Subject: Re: [AccessD] compare nulls
>
>I think the explanation is that Null is nothing and nothing can't be
>equal to anything, not even another nothing. Or thereabouts. Perhaps
>some IS NULL functions can be added.
>
>GK
>
>On 1/17/07, Mark A Matte <markamatte at hotmail.com> wrote:
> > Hello All,
> >
> > I have 2 text boxes I need to compare to see if they are equal...but if
>they
> > are both null it does not match.  In the example below if text1 and 
>text2
> > are both null...it says not equal?  I'm sure its easy to get around
> > this...or is this even normal?
> >
> > IF me!text1=me!text2 then
> > msgbox"Equal"
> > else
> > msgbox"Not Equal"
> > end if
> >
> > Thanks,
> >
> > Mark
> >
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Get FREE Web site and company branded e-mail from Microsoft Office Live 
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




More information about the AccessD mailing list