I am opening an access report from my vb code.
I have designed an report in access database and opening it from vb. It works fine. Now I have put password for the database. I want to include the password in this code.
How do I do it ? Please help...
The code is as follows....
Dim access_app As Object
Dim access_report, db_file As String
access_report = "CHECKLIST_FOR_PROJECT"
db_file = App.Path & "\xxxx.MDB"
Set access_app = CreateObject("Access.Application")
access_app.Visible = True
access_app.OpenCurrentDatabase db_file
access_app.DoCmd.Minimize
access_app.DoCmd.OpenReport access_report, acViewPreview
I have designed an report in access database and opening it from vb. It works fine. Now I have put password for the database. I want to include the password in this code.
How do I do it ? Please help...
The code is as follows....
Dim access_app As Object
Dim access_report, db_file As String
access_report = "CHECKLIST_FOR_PROJECT"
db_file = App.Path & "\xxxx.MDB"
Set access_app = CreateObject("Access.Application")
access_app.Visible = True
access_app.OpenCurrentDatabase db_file
access_app.DoCmd.Minimize
access_app.DoCmd.OpenReport access_report, acViewPreview