B
briank
I would like to eliminate the recordsource for a subreport from a form's
command button. However, upon running my code errors out stating: "The
report name 'rptMABR_blank' you entered is misspelled or refers to a report
that isn't open or doesn't exist". Any ideas how to get a subreport's record
source to = "" ?
Private Sub Command70_Click()
On Error GoTo Err_Command70_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "rptMABR_Blank"
stWhere =
[Reports]![rptMABR_Blank]![rptMABR_pg5_blank].[Report]![sfrmMABR_PlanQ1].RecordSource = ""
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_Command70_Click:
Exit Sub
Err_Command70_Click:
MsgBox Err.Description
Resume Exit_Command70_Click
End Sub
command button. However, upon running my code errors out stating: "The
report name 'rptMABR_blank' you entered is misspelled or refers to a report
that isn't open or doesn't exist". Any ideas how to get a subreport's record
source to = "" ?
Private Sub Command70_Click()
On Error GoTo Err_Command70_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "rptMABR_Blank"
stWhere =
[Reports]![rptMABR_Blank]![rptMABR_pg5_blank].[Report]![sfrmMABR_PlanQ1].RecordSource = ""
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_Command70_Click:
Exit Sub
Err_Command70_Click:
MsgBox Err.Description
Resume Exit_Command70_Click
End Sub