And/Or If Statements

Krysti

Registered User.
Local time
Today, 17:13
Joined
Sep 20, 2002
Messages
40
Okay, really really really dumb, basic code question. As you can see from this question, I am pretty code illiterate, but still try to write it. This always drives me crazy, I don't know the proper way to do this!!

What would be the proper way to write this?

If [pH] < 10 or [pH] > 12 and [SamplePt] = "A" Then

[pH].Forecolor = 255

End If

In my mind, I want it to work like this:

If ([pH] < 10 or [pH] > 12) and [SamplePt] = "A" Then........

Like in math when you want a specific operation to be performed first, you enclose it in parenthesis.

HELP!!! :o

Hopefully this makes sense what I'm trying to do...

Thanks,

Krysti
 
Same in code, you are on the proper path.
 
OH!!!! DUH!!!!

I could have sworn I had tried that before and it didn't work!

Thank you :D :D :D
 

Users who are viewing this thread

Back
Top Bottom