Using multiple 'and' and 'or' statements in a conditional

Thanks for the reply. I had tried parenthesis but must have mistyped something because I was getting config errors. I tried again this morning with a fresh brain and it worked as it should.