Query1 yields no matches:
FROM tblProducts AS PR, tblStylesXProducts AS SXP
(SXP.StyleID= 5 AND SXP.ProductID=PR.ID)
Query 2 yields the proper matches
FROM tblProducts AS PR
Table tblStylesXProducts (a cross-products table to allow for "secondary" styles for each product) has no records in it presently.
How am i misunderstanding the specification of WHERE to achieve the OR effect.
My understanding is that if the table is empty, then it would have no effect on allowing the first part of the WHERE to contribute as desired.
An aside: this was designed this way to simplify the most common case where there are no secondary styles, and thus admin entry is simple in the tblProducts. An alternative would be to remove the PrimaryStyleID field and make that a flag/boolean within tblStylesXProducts to indicate that this record's combination is the Primary Style. (but then each product would have to generate a separate record in the tblStylesXProducts table)