General information
Category:
Coding, syntax & commands
Hi all,
I have and/or boolean clause which worked fine only for OR fo any one word to maximum of 4 words but did not work at all for AND if I put one of 4 words
please correct my codes if something is wrong,
Thanks in advance,
Paul
for example :
OR case:
4 words to be entered : in 4 textboxes .
box1,box2,box3,box4
my name is paul OK
my name is OK
my name OK
my OK
---------------------------------------------------------
AND CASE :
4 words to be entered : in 4 textboxes .
box1,box2,box3,box4
my name is paul OK
my name is INCORRECT
my name INCORRECT
my INCORRECT
ALWAYS NEEDED 4 WORDS IN FULL IN ORDER TO HAVE SOMETHING BUT
I WOULD LIKE TO ENTER ONLY ONE WORD LIKE :
my STILL HAVE TO GIVE ALL my ANYWAY.
-------------------------------------------------
cMemos1=iif(empty(allt(cMemos1)),'',allt(cMemos1))
cMemos2=iif(empty(allt(cMemos2)),'',allt(cMemos2))
cMemos3=iif(empty(allt(cMemos3)),'',allt(cMemos3))
cMemos4=iif(empty(allt(cMemos4)),'',allt(cMemos4))
CREATE CURSOR dbtemp1 ( empno C(5),notes m(10) )
lcEmptyMemo = [SELECT * FROM dbtemp2 WHERE empty(cMemos1) OR empty(cMemos2) OR empty(cMemos3) OR empty(cMemos4) INTO cursor dbtemp1 ]
llBoolean1 = IIF(thisform.opgtext1.value = 1, [AND ], [OR ])
lcAndOrMemo = ;
[SELECT empno,notes FROM dbtemp2 ] + ;
[WHERE ] + ;
[cMemos1 $ UPPER(notes) ] + llBoolean1 + ;
[cMemos2 $ UPPER(notes) ] + llBoolean1 + ;
[cMemos3 $ UPPER(notes) ] + llBoolean1 + ;
[cMemos4 $ UPPER(notes) ] + ;
[INTO cursor dbtemp1 ]
if empty(cMemos1) and empty(cMemos2) and empty(cMemos3) and empty(cMemos4)
&lcEmptyMemo
else
&lcAndOrMemo
endif
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only