T
Tim
I try to use DAO to pull out two values from a query (qryTeacher). This query
is created by combining four tables that have inner join relationships. In
VBA, I wrote the codes as following (with all variables are already declared
properly.)
strSQLTeacher = "SELECT StudID, email FROM qryTeacher WHERE
((qryTeacher.StudID)='" & varStudID & "');"
Set rstTeacher = Student_DB.OpenRecordset(strSQLTeacher)
I got the error message saying that "database engine cannot find the input
table or query, "qryTeacher". BTW, I use Windows Vista and Access 2007. I
guess I have to write the full SQL statement that forms the query, not just
the query name, qryTeacher, for strSQLTeacher. Please help! Thank you.
is created by combining four tables that have inner join relationships. In
VBA, I wrote the codes as following (with all variables are already declared
properly.)
strSQLTeacher = "SELECT StudID, email FROM qryTeacher WHERE
((qryTeacher.StudID)='" & varStudID & "');"
Set rstTeacher = Student_DB.OpenRecordset(strSQLTeacher)
I got the error message saying that "database engine cannot find the input
table or query, "qryTeacher". BTW, I use Windows Vista and Access 2007. I
guess I have to write the full SQL statement that forms the query, not just
the query name, qryTeacher, for strSQLTeacher. Please help! Thank you.