O
Oscar
This is my query :
strQuery = "SELECT DISTINCT ID_emp,name,adres,city, " _
& " sports = IIF(EXISTS(SELECT ID_sport FROM tblSports WHERE
ID_pers= tblArbCtr.persID), 1, 0)" _
& " FROM tblArbCtr,tblEmployee WHERE Contract = 0 AND
tblArbCtr.persID=tblEmployee.ID_emp"
I want to find out the employees who don't have a contract (contract=0)
first, and after that I want to verify whether they have a sport with the
derived 'sports' column. The compiler fires the following error : '3061 :
Too few parameters. expected 1'
Any idea how I need to change the query to have it running. I've already
checked the table and field names, they all are correct. Maybe it's a wrong
use of the IIF operator.
regards,
Oscar
strQuery = "SELECT DISTINCT ID_emp,name,adres,city, " _
& " sports = IIF(EXISTS(SELECT ID_sport FROM tblSports WHERE
ID_pers= tblArbCtr.persID), 1, 0)" _
& " FROM tblArbCtr,tblEmployee WHERE Contract = 0 AND
tblArbCtr.persID=tblEmployee.ID_emp"
I want to find out the employees who don't have a contract (contract=0)
first, and after that I want to verify whether they have a sport with the
derived 'sports' column. The compiler fires the following error : '3061 :
Too few parameters. expected 1'
Any idea how I need to change the query to have it running. I've already
checked the table and field names, they all are correct. Maybe it's a wrong
use of the IIF operator.
regards,
Oscar