How to change the RowSource in a Report OLE object -
01-29-2009
, 02:29 PM
Dear reader,
In the open event of a report you can change the RecordSource of the report
for instance:
Dim db As DataBase
Dim Rst1 As DAO.Recordset
Set db = CurrentDb
Set Rst1 = db.OpenRecordset("Mtb_Check")
If Rst1!Check_YN = True Then
Me.RecordSource = "Query-1"
Else
Me.RecordSource = "Query-2"
End If
Now I have in a report an OLEunbound object (an Excel diagram).
This object has a RowSource instead of RecordSource.
How to change the RowSource of this OLEunbound object in the open event of
the report.
Me.OLEunbound.RowSource = "Query-1" is not working.
Thanks for any help or suggestion.
Kind regards,
Simon |