(no subject)
Would someone PLEASE tell me why
IF NOT strEventType = "Absence" THEN
[blah]
END IF
produces [blah] for all occurences of strEventType, whether it's full of "Absence" or "Meeting" or what, yet
IF strEventType = "Absence" THEN
[blah]
END IF
skips over the IF statement for everything, whterh strEventType is "Absence" or "Meeting" or what?
Telophase no understand VBScript IF statements. Telophase want PHP back.
IF NOT strEventType = "Absence" THEN
[blah]
END IF
produces [blah] for all occurences of strEventType, whether it's full of "Absence" or "Meeting" or what, yet
IF strEventType = "Absence" THEN
[blah]
END IF
skips over the IF statement for everything, whterh strEventType is "Absence" or "Meeting" or what?
Telophase no understand VBScript IF statements. Telophase want PHP back.
no subject
I'm wondering if "strEventType" might have gotten declared as a variant instead of a string type (variant being the default) and if that's screwing up the comparison, but can't find a good reference to it. Try explicitly declaring it as a string if you haven't already (if you have, never mind me). Or if it's declared as a fixed-length string the trailing blanks might be screwing it up.
If that doesn't help, I'd probably put "strEventType = "Absence" " before the IF and see what happens.
no subject
I know that it's carrying "Absence" and "Meeting" and whatnot - before I started putting the IF in to get it to print the hours only if it wasn't an absence (obviously, this is a calendar-type app), it was printing them just fine and I'm sure that I haven't touched anything to mess that up. (It's about the only thing I'm sure of, of course.)
They do have the same capitalization because those are actually being pulled from another table in the database. I'm using the name instead of the ID number to make it easier on myself when I look over the script - if I used the number I end up confusing myself later on when I need to go back and redo something in the script.
Aarg. Well, I have a weekend to let it mull in my subconscious - I'll take a look at your suggestions when I get back on Monday. Thanks!
no subject
Yup
...might have gotten declared as a variant instead of a string type
Doesn't seem to be what's at fault - checking using VarType() spits '8' back out, which means it's a string. And I don't think there's anything about the length one way or the other in it - it's just declared as "Dim strEventType"
If that doesn't help, I'd probably put "strEventType = "Absence" " before the IF and see what happens.
No change in behavior, no matter what's in strEventType. Sigh.
Ah well, I shall slap the ID numbers of the event types in it to see if *that* changes anything.
no subject
no subject
I wouldn't have thought of that if you hand't mentioned it. :) Thanks!
Now on to whatever the next horrid error is going to be!
no subject