Hello Joe,
I think you just got your boolean logic mixed up.
Look at your statement again...
You'll get your broken rule added if any of those three <> statements resolves to true, and from what I can tell, one will always resolve to true, right?
I think you wanted "and" operators instead of "or" ones?
---J
>I am not able to save a record due to the following Business Rule not passing.
>Any thoughts on how I can correct my code to restrict the values to "Square", "RectangleLandscape" or "RectanglePortrait"?
>
>The value being tested, companyLogoShape, gets a database default of "Square" and this value is bound to a combobox that would only permit acceptable values yet I am not ever passing the validation criteria of my Business Rules object detailed below:
>
>
>' Validate the CompanyLogoShape
> Public Function ValidateCompanyLogoShape(ByVal companyLogoShape As String) As String
> Dim message As String = Nothing
>
> If companyLogoShape <> "Square" _
> Or companyLogoShape <> "RectangleLandscape" _
> Or companyLogoShape <> "RectanglePortrait" Then
> message = "Logo Shape must be either Square, " _
> + "RectangleLandscape, or RectanglePortrait"
> Me.AddErrorProviderBrokenRule("CompanyLogoShape", message)
> End If
> Return message
> End Function
>