Hi,
I have the following partial code:
Code:
Dim db As dao.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "Select * from qryQueryNameSubReport WHERE MarkDeleted = -1"
rptMAinReportName.cntContainerName.Report.RecordSource = strSQL
DoCmd.OpenReport "rptReportName", view:=acViewPreview, wherecondition:=strCriteriaDim db As dao.Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "Select * from qryQueryNameSubReport WHERE MarkDeleted = -1"
rptSubReportReportName.cntCollected.Report.RecordSource = strSQL
DoCmd.OpenReport "rptTReportName", view:=acViewPreview, wherecondition:=strCriteria
I am receiving the following error
Error 91: Object variable or With block variable not set
Any ideas?