sql - Can't debug MS Access 2013 Run-time Error 91 -


i can't seem de-bug following run-time error 91.

dim db dao.database dim rs3 dao.recordset  set rs3 = db.openrecordset("select company, " & _ "stdev(daylog) [stdevdaylog], " & _ "count(date) [countday] " & _ "from table1 " & _ "where (date <= #6/1/2013# " & _ "and date > #6/1/2008#) " & _ "group company;") 

any recommendations?

set object variable currentdb before attempting db.openrecordset

set db = currentdb set rs3 = db.openrecordset ... 

it seems table includes field named date, name of function. can bracket name or qualify table name or alias avoid confusing db engine.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -