Hi guys ,

this code is using to open crystal report from VB6 with database MSAccess but the problem is if there a password for the database this code will not working

can anyone help me to correct to used it with password database

Private Sub CmdPrn_Click()
ServerSetup1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & LocationFile & "\PSCData.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False;;Jet OLEDBatabase Password=Mi40;"

rpt1 = LocationFile & "\RptTrans.rpt"
With MDIMain.CrystalReport1
.ReportFileName = rpt1
.Connect = ServerSetup1
.DiscardSavedData = True
.RetrieveDataFiles
.ReportSource = 0
.Destination = crptToWindow
.PrintFileType = crptCrystal
.WindowState = crptMaximized
.WindowMaxButton = False
.WindowMinButton = False
.SelectionFormula = "{Trans.ProNum} ='" & TxtCaseNum.Text & "'"
.Action = 1
End With
End sub