In a Access 2007 DB
I have a Parameter query with conditions on 2 fields & set those conditions to be whatever is selected in a combo box on a form (there are 2 combo boxes on this particular form). What Im trying to achieve is a parameter search that will perform the following.
If ProjectDirector selected & ProjectManager not = show all results for ProjectDirector
If ProjectManager selected & ProjectDirector not = show all results for ProjectManager
If ProjectDirector & ProjectManager selected = show results for both
If nothing selected = msgbox Select Project Director, Manager or both.
The query will provide results correct if the ProjectManager or ProjectDirector are selected individually
The problem is if both fields are selected it only provides results as though the first field (ProjectDirector) was selected.
The SQL for the query is :
SELECT tblProjectInfo.JobNum, tblProjectInfo.ProjectDirector, tblProjectInfo.ProjectManager, tblProjectInfo.ProjectDescript
WHERE (((tblProjectInfo.ProjectDirector)=Forms!frmWhatIs Mine!Combo0 And (tblProjectInfo.ProjectManager)=Forms!frmWhatIsMin e!Combo3)) Or (((tblProjectInfo.ProjectDirector)=Forms!frmWhatIs Mine!Combo0)) Or (((tblProjectInfo.ProjectManager)=Forms!frmWhatIsM ine!Combo3));