Hello!
I am working on a form which uses the selection in a combo box to open a subreport. The code works when I use it to open another form but when I try and use it to open a report I get "Run time error 2101 - The setting you entered isn't valid for this property"
This is the specific code it calls out in the debug:
Code:
Private Sub cboSource_AfterUpdate()
If Me.cboSource.Value = "" Then
End
Else
Me.Child59.SourceObject = Me.cboSource
End If
End Sub
This is the rest of the code in case:
Code:
Option Compare Database
Option Explicit
Private Sub cboSource_AfterUpdate()
If Me.cboSource.Value = "" Then
End
Else
Me.Child59.SourceObject = Me.cboSource
End If
End Sub
Private Sub cboSource_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.cboSource.SetFocus
Me.cboSource.Dropdown
End Sub
Private Sub Form_Load()
Me.lblInfo.Caption = "Dashboard"
DoCmd.Maximize
Me.SummaryBox.Visible = False
Me.CoverageBox.Visible = False
Me.InvestigationBox.Visible = False
Me.ScopeBox.Visible = False
Me.ReservesBox.Visible = False
Me.AssetBox.Visible = False
Me.ComplianceBox.Visible = False
Me.VendorBox.Visible = False
Me.DataBox.Visible = False
Me.DocBox.Visible = False
Me.ClaimBox.Visible = False
Me.ManagerBox.Visible = False
End Sub
Private Sub btn_Summary_Click()
Me.ReportValue.Value = 1
Me.cboSource.RowSource = "SELECT [tbl_Source].[ReportName] FROM" & _
" tbl_Source WHERE ReportValue = " & Me.ReportValue & _
" Order By ReportValue"
Me.cboSource.SetFocus
Me.cboSource.Dropdown
Me.lblInfo.Caption = "Summary Results"
Me.SummaryBox.Visible = True
Me.CoverageBox.Visible = False
Me.InvestigationBox.Visible = False
Me.ScopeBox.Visible = False
Me.ReservesBox.Visible = False
Me.AssetBox.Visible = False
Me.ComplianceBox.Visible = False
Me.VendorBox.Visible = False
Me.DataBox.Visible = False
Me.DocBox.Visible = False
Me.ClaimBox.Visible = False
Me.ManagerBox.Visible = False
End Sub
Anyone have an idea as to what is wrong here?
Thank you for your help!