J
Joel
Hello, I have a query that is set at runtime but im getting error 91 "Object
variable or With block variable not set".
I have several other reports that use this code but this is the only one
that gives me this error: Here is the SQL.
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strCriteria As String
Dim strDocName As String
Dim stWhere As String
strCriteria =[Forms]![Contents]![P]
if strCriteria = "P9" Then
Set qdf = db.QueryDef("CSMPRepair") - THIS IS WHERE I GET THE ERROR (yes I
spell checked it)
Set db = CurrentDb()
Exc....
This code was copied from another one i wrote that works perfect. All i did
was change the db.QueryDef to CSMPRepair and changed the sql statement.
Any Ideas?
Thanks!
variable or With block variable not set".
I have several other reports that use this code but this is the only one
that gives me this error: Here is the SQL.
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strCriteria As String
Dim strDocName As String
Dim stWhere As String
strCriteria =[Forms]![Contents]![P]
if strCriteria = "P9" Then
Set qdf = db.QueryDef("CSMPRepair") - THIS IS WHERE I GET THE ERROR (yes I
spell checked it)
Set db = CurrentDb()
Exc....
This code was copied from another one i wrote that works perfect. All i did
was change the db.QueryDef to CSMPRepair and changed the sql statement.
Any Ideas?
Thanks!