adding the following line after the with...end with:
MyReport.Database.Tables(0).ApplyLogOnInfo(myTable LogonInfo)
For me that alone did not provide the complete solution. I went to the report that was added to the project (ch3_worldsales_northwind.rpt) and opened it up. Then right click any where on the report, select database, select 'set database location' and pointed it to the copy in c:\program files\microsoft office\office\samples\northwind.mdb and clicked update. I also did a verify database (right click, database, verify database). This is what worked for me. Hope it helps some one else
|