I have the follwoing code in my VB app...

For Each crxDatabaseTable In Report.Database.Tables
crxDatabaseTable.SetDataSource ("C:\Techni.mdb")
crxDatabaseTable.ConnectionProperties("Password") = "fred"
Next crxDatabaseTable

It works just fine. I use it for every report that I run from within my app. However, I have one small problem. A lot of times, a user will come back and tell me that there is a problem. So, I step through the code trying to find the error. The user, looking over my shoulder can see the db password in the source code.

How can I just reference a variable in the report connection property? Or can I set up a global subroutine and call that? I don't want all my users knowing the db password.