dbTalk Databases Forums  

How to change the RowSource in a Report OLE object

comp.databases.ms-access comp.databases.ms-access


Discuss How to change the RowSource in a Report OLE object in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Simon van Beek
 
Posts: n/a

Default 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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.