You need to prepend a linefeed character to the password for it to work, see the example below:
Dim mCRXReport As CRAXDRT.Report
Dim crxTable As CRAXDRT.DatabaseTable
Set mCRXReport = mcrxApplication.OpenReport _
("MyFolder\MyReport.rpt", 1)
For Each crxTable In mCRXReport.Database.Tables
'The next line just supplies the database location
crxTable.SetTableLocation "c:\MyStuff\MyData.mdb", "", ""
'Add a linefeed to your password
crxTable.SetSessionInfo "", Chr(10) & "MyPassword"
Next crxTable
Best Regards,
Al Weisenborn
|