ashiyr Level: Protégé
 Registered: 05-04-2007 Posts: 5
|
Crystal Report 10, VB6 & with password Msaccess
i just want to know how to open report if msaccess database have password? in my form i use Crviewer in CR10.
kindly help. where do i put the code to open the report?
Private Sub Form_Initialize()
Call OpenCrystalReport
End Sub
Private Sub OpenCrystalReport()
Dim CRReport2 As CRAXDRT.Report
Dim CRApp2 As New CRAXDRT.Application
Set CRReport2 = CRApp2.OpenReport(App.Path & "\Attendance.rpt")
With CRReport2
'Set the Access database path
.Database.Tables(1).Location = App.Path & "\Mygradingsys.mdb"
End With
With CRViewAtt
.ReportSource = CRReport2
.ViewReport
While .IsBusy
DoEvents
Wend
.Visible = False
.Refresh
End With
Set CRApp2 = Nothing
Set CRReport2 = Nothing
|