Re: combining 2 expressions
  Home FAQ Contact Sign in
microsoft.public.access.queries only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: combining 2 expressions         

Group: microsoft.public.access.queries · Group Profile
Author: clalc
Date: Jan 28, 2010 21:53

You are right Marsh I have used 0 and 1 for words and it worked.
thank you !

"Marshall Barton" wrote:
> clalc wrote:
>
>>I have created 2 separate expressions in query:
>>Test_1: IIf([Table]![Field2] Not Like ("*[A-Z0-9]*"),"Missing",0)
>>
>>Test_2: IIf([Table]![Field1] Not Like ("*[A-Z0-9]*"),1, "Found")
>>
>>When I combine them into:
>>Test_3: IIf([Table]![Field1] Not Like ("*[A-Z0-9]*"),1,IIf([Table]![Field2]
>>Not Like ("*[A-Z0-9]*"),"Missing",0))
>>I get the #Error message where Field2 is missing. Why is that so ?
>>
>
>
> Can't be sure, but you are probably confusing Access about
> what type the field should be. Since you need text some of
> the time, you really need to make it text all the time by
> enclosing the 1 and 0 in quotes.
>
> --
> Marsh
> MVP [MS Access]
> .
>
no comments
diggit! del.icio.us! reddit!