Help Me Pls Here! Thank You!

netbytes

Registered User.
Local time
Today, 04:00
Joined
Aug 11, 2008
Messages
33
Hi,

This is the query I have.

UPDATE MorningBite SET MorningBite.hideproduct = IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK')<>0,"Y","N");

and this is my question.

How to add another option in this area? I want to add DISCONTINUED word so that if the query runs, it will find all "OUT OF STOCK and DISCONTINUED" words in my field named customfield1

IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK')<>0


Thank you,

Hope someone can answer.. thx again! :D
 
IIf(Instr(UCase(MorningBite.customfield1),'DISCONTINUED')<>0

Is that what you are looking for?
 
actually yes also..

but i want it in 1 query the "out of stock and discontinued".

so that i can run it in one click.. then update the field.. if theres any discontinued and out of stock words. :D

how to add in this query.. because i tried many times to add the word discontinued but ... i got errors.


UPDATE MorningBite SET MorningBite.hideproduct = IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK')<>0,"Y","N");
 
Ive tried this one but still i got errors.

UPDATE MorningBite SET MorningBite.hideproduct = IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK','DISCONTINUED')<>0,"Y","N");
 
Inventive, but yes incorrect....

Do you want BOTH words to be in the text simulatiously?
IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK')<>0
AND
Instr(UCase(MorningBite.customfield1),'DISCONTINUED')<>0,"Y","N");

Or do you want one or the other?
IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK')<>0
OR
Instr(UCase(MorningBite.customfield1),'DISCONTINUED')<>0,"Y","N");
 
Last edited:
yah i want those words 'both" in the text simultaneously..

thx how to do that?
 
Exactly the way I posted above...

Do you want BOTH words to be in the text simulatiously?
IIf(Instr(UCase(MorningBite.customfield1),'OUT OF STOCK')<>0
AND
Instr(UCase(MorningBite.customfield1),'DISCONTINUED')<>0,"Y","N");
 

Users who are viewing this thread

Back
Top Bottom