hi,
I am using an 'IFF' function in a Query as below.
SELECT ID,IIf([LectureORLab]='Lecture',[Hours],Null) AS Lectures, IIf([LectureORLab]='Lab',[Hours],Null) AS Labs FROM Courses;
And it worked fine as a Access Query.I used the same query in my (both)ADO,DAO code.i was getting an error.
There is no problem with my ADO,DAO code since it works when i remove the 'IFF' statement and use table fields.
I used the query in ADO to create a recordset and in DAO i
was using dbs.CreateQueryDef("qryMyQuery", SQL) to create
a query using code.
it was not working in both cases.
Does ADO,DAO recognize 'iff' function.if so how do we
represent it in ADO,DAO(SQL JET).
Any help or Links would be helpfull,
Thanks,
Rann.
I am using an 'IFF' function in a Query as below.
SELECT ID,IIf([LectureORLab]='Lecture',[Hours],Null) AS Lectures, IIf([LectureORLab]='Lab',[Hours],Null) AS Labs FROM Courses;
And it worked fine as a Access Query.I used the same query in my (both)ADO,DAO code.i was getting an error.
There is no problem with my ADO,DAO code since it works when i remove the 'IFF' statement and use table fields.
I used the query in ADO to create a recordset and in DAO i
was using dbs.CreateQueryDef("qryMyQuery", SQL) to create
a query using code.
it was not working in both cases.
Does ADO,DAO recognize 'iff' function.if so how do we
represent it in ADO,DAO(SQL JET).
Any help or Links would be helpfull,
Thanks,
Rann.