Hi,
I used the code below to load data into a DataReport based on an ado recordset. I did this because my user needs to select reports based on investor ID's and other run time citeria.
This works well enough but now I can't figure out how to populate the labels which are not datbase connected.
Private Sub cmdHistory_Click()
frmDataReports.adoHistory.RecordSource = "SELECT * FROM History WHERE Investor_Number = " & frmStartPage.txtInvestorNumber & " Order By Date DESC"
frmDataReports.adoHistory.Refresh
Dim rsClone As ADODB.Recordset
Set rsClone = frmDataReports.adoHistory.Recordset.Clone
Set drHistory.DataSource = rsClone
drHistory.Show
End Sub
This is an example of the string needed to populate the Header. This raises an error. I tried using the "Set" keyword ahead of the statement. Also raises an error.
drHistory.Sections("ReportHeader"
.Controls.Item("lblInvestorName"
.Caption = lblInvestorName
Any suggestions would be greatly appreciated.
Regards,
Dwight
"The more I learn, the smarter you guys get."
I used the code below to load data into a DataReport based on an ado recordset. I did this because my user needs to select reports based on investor ID's and other run time citeria.
This works well enough but now I can't figure out how to populate the labels which are not datbase connected.
Private Sub cmdHistory_Click()
frmDataReports.adoHistory.RecordSource = "SELECT * FROM History WHERE Investor_Number = " & frmStartPage.txtInvestorNumber & " Order By Date DESC"
frmDataReports.adoHistory.Refresh
Dim rsClone As ADODB.Recordset
Set rsClone = frmDataReports.adoHistory.Recordset.Clone
Set drHistory.DataSource = rsClone
drHistory.Show
End Sub
This is an example of the string needed to populate the Header. This raises an error. I tried using the "Set" keyword ahead of the statement. Also raises an error.
drHistory.Sections("ReportHeader"
Any suggestions would be greatly appreciated.
Regards,
Dwight
"The more I learn, the smarter you guys get."