Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report from MDB with password

Status
Not open for further replies.

sisan

Programmer
Jan 9, 2002
39
ID
I know to use VB, Access and Crystal Report such as:

Private Sub Command1_Click()
cr1.DataFiles(0) = [Access/.MDB file]
cr1.ReportFileName = [Cystal report/.RPT file]
cr1.Destination = crptToWindow
cr1.Action = 1
End Sub

But how if the .MDB contains a password?
Urgently need ur help

Regard,
Sigit
 
You need to supply the password to the database before you can run the report. I haven't used the OCX in a very long time, but try adding this line:

cr1.Connect = "PWD=YourPassword"

-dave
 
Wow, its so simple. But this is what I need to know, and ..
thanks, Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top