R
Robert
I have the following code:
Dim db As DAO.Database
strSQL = "INSERT INTO tblRentaldetails ( Rentalid, Itemid ) "
strSQL = strSQL & "SELECT '177' As Expr1, modelid AS Expr2 FROM
tblReservations WHERE "
strSQL = strSQL & "tblReservations.reservationsmainid = 64"
Set db = CurrentDb
db.Execute SQLstr, dbFailonError
which generates the error:
The Microsoft Jet database engine cannot find the input table or query.
Make sure it exists and that its name is spelled correctly.
But if I chanage it to docmd.runsql it works fine. I have similar code
working elsewhere in the database and Microsoft 2.5/3.5 compatability
Library is checked on in tools/references. So why do I get this message
when i use .Execute?
Robert
Dim db As DAO.Database
strSQL = "INSERT INTO tblRentaldetails ( Rentalid, Itemid ) "
strSQL = strSQL & "SELECT '177' As Expr1, modelid AS Expr2 FROM
tblReservations WHERE "
strSQL = strSQL & "tblReservations.reservationsmainid = 64"
Set db = CurrentDb
db.Execute SQLstr, dbFailonError
which generates the error:
The Microsoft Jet database engine cannot find the input table or query.
Make sure it exists and that its name is spelled correctly.
But if I chanage it to docmd.runsql it works fine. I have similar code
working elsewhere in the database and Microsoft 2.5/3.5 compatability
Library is checked on in tools/references. So why do I get this message
when i use .Execute?
Robert