Hello.
I am attempting to design a search that makes use of multiple comboboxes to allow users to select an array of criteria.
My present goal is to allow users to search by the following choices, which I'll explain a little more:
- paygrade
- department
PayGrade lives in a table tblPayGrade that has a 1:1 with tblSailors. Dept lives in a table tblDept that is 1:1 with tblSailors. (Each Sailor has one PG and one DEPT) The form is 'SearchForm.'
SELECT tblPayGrade.PayGrade, tblDept.Dept
FROM tblPayGrade, tblDept WHERE (((TblPayGrade.PayGrade)=[Forms]![SearchForm]![TblPayGrade.PayGrade] Or Is Null([Forms]![SearchForm]![TblPayGrade.PayGrade])) AND ((TblDept.Dept)=[Forms]![SearchForm]![TblDept.Dept] Or (Is Null([Forms]![SearchForm]![TblDept.Dept])));
Access has not loved this statement fom the beginning! However, after clearing a bunch of complaints, I am now getting "Missing Operand."
Perhaps I've been staring at this thing too long, because I don't see the problem. However, Access stubbornly refuses to see my point of view.
I would love to get any guidance on this vexing SELECT, I guess starting with "Missing Operand."
Many thanks!
John
I am attempting to design a search that makes use of multiple comboboxes to allow users to select an array of criteria.
My present goal is to allow users to search by the following choices, which I'll explain a little more:
- paygrade
- department
PayGrade lives in a table tblPayGrade that has a 1:1 with tblSailors. Dept lives in a table tblDept that is 1:1 with tblSailors. (Each Sailor has one PG and one DEPT) The form is 'SearchForm.'
SELECT tblPayGrade.PayGrade, tblDept.Dept
FROM tblPayGrade, tblDept WHERE (((TblPayGrade.PayGrade)=[Forms]![SearchForm]![TblPayGrade.PayGrade] Or Is Null([Forms]![SearchForm]![TblPayGrade.PayGrade])) AND ((TblDept.Dept)=[Forms]![SearchForm]![TblDept.Dept] Or (Is Null([Forms]![SearchForm]![TblDept.Dept])));
Access has not loved this statement fom the beginning! However, after clearing a bunch of complaints, I am now getting "Missing Operand."
Perhaps I've been staring at this thing too long, because I don't see the problem. However, Access stubbornly refuses to see my point of view.
I would love to get any guidance on this vexing SELECT, I guess starting with "Missing Operand."
Many thanks!
John