Access VBA / SQL Question

This is an sql question geared specefically to Access which is why its here. I’ve got a query built to show WHERE criterea Environ() which is a variable that grabs the users log in name. Important part of this sistuation is that I need to change this critera to a select all type of where clause if certain conditions are met.

I don’t need any help meeting these conditions or setting anything up other than a way to pass a variable to the query that doesnt fail.

WHERE ID = Environ()

Environ() changes D123456 to ‘A123456’ automatically I suppose. Query works. Then I try to to username in my vba to ‘A123456’ OR ‘B123456’ but it fails. Same result with A123456’ Or 'B123456 to compensate for possible addition of quotes on ends of string.

Also tried changing string to In(‘A123456’, ‘B123456’) with no luck.

Its important to know that this function works correctly with just a single username being passed, and that these queries work when manually placed in the WHERE condition.

ANy help here would be greatly appreciated