Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I say NOT IN in an IF statement

Status
Not open for further replies.

jmueller

MIS
Oct 9, 2001
57
US
This has to be an easy one!

What's wrong with the following IF statement:

-------------------------------------------------------
If {BBJOBCST.SHIFT} NOT IN [AllShifts]
Then (TotalShiftsWithRuns = TotalShiftsWithRuns + 1;
AllShifts = AllShifts + "," + {BBJOBCST.SHIFT})
-------------------------------------------------------
The variables are all initialized.

I get an error saying "The Keyword THEN is missing" and puts the cursor right before the NOT statement.

Your help is very much appreciated.

Jack.
 
Jack,

Change to:
-------------------------------------------------------
If NOT({BBJOBCST.SHIFT} IN [AllShifts])
Then (TotalShiftsWithRuns = TotalShiftsWithRuns + 1;
AllShifts = AllShifts + "," + {BBJOBCST.SHIFT})
-------------------------------------------------------
Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top