hello gurus,
i had problem accessing secured database in crystal reports in my Visual Basic application i successfully did it after all the help from this forum now i am having a small problem

what i have done is that i used same line of code in all forms but changed the report source to report1 , report 2 , report3 respectively rest all lines are same
its running well in development envt but when i run it after installing the first report runs well while i click on next report it gives error memory referrenced ..click ok to terminate program or cancel to debug it..

plz help me where i am faltering..
i have added crystal reports report1 report 2 and report3 to my package as well while making deployment package...

help me its urgent

Private m_App As New CRAXDDRT.Application
Private m_Rep As New CRAXDDRT.Report
Public mRepName As String
Public mstrW As String
Dim strw As String
Public mstrUName As String
Public msRepTitle As String

Private Sub Command1_Click()

If List1.Text = "" Then
MsgBox ("Select Job No")
Exit Sub
Else
If dtp1.Value = "" And dtp2.Value = "" Then
MsgBox ("Select Dates from two Calendars")
Exit Sub
Else

'strW = "{assignjob.cusname} = '" & cboStudyAreas.Text & ""
''to use''''''''mstrW = "{ customerdetails.csno} = 9 "
Dim ConnectionInfo As CRAXDDRT.ConnectionProperties
Dim test As String

mRepName = App.Path & "\report1.rpt"
test = App.Path & "\ proj1.mdb"

Set m_Rep = m_App.OpenReport(mRepName, 1)
m_Rep.RecordSelectionFormula = mstrW
Dim nm As String
nm = List1.Text
Dim dt1 As String
Dim dt2 As String
dt1 = Format(dtp1.Value, "yyyy,mm,dd,0,0,0")
dt2 = Format(dtp2.Value, "yyyy,mm,dd,0,0,0")
strw = "{assignjob.jobno} = '" & List1.Text & "' and {assignjob.releaseddate} in DateTime (" & dt1 & ") to DateTime (" & dt2 & ")"

Set ConnectionInfo = m_Rep.Database.Tables(1).ConnectionProperties
'On Error Resume Next
m_Rep.Database.Tables(1).DllName = "crdb_dao.dll"
Set ConnectionInfo = m_Rep.Database.Tables(2).ConnectionProperties
m_Rep.Database.Tables(2).DllName = "crdb_dao.dll"
ConnectionInfo.DeleteAll
ConnectionInfo.Add "proj.mdb", test
ConnectionInfo.Add "session UserID", "admin"
ConnectionInfo.Add "Session Password", "dips"


Form1.mstrW = strw
List1.Visible = False
Command1.Visible = False
CRViewer91.ReportSource = m_Rep
'CRViewer91.Visible = True
Command2.Visible = True
CRViewer91.ViewReport
CRViewer91.Zoom 1
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = ScaleHeight
CRViewer91.Width = ScaleWidth
Set m_Rep = Nothing
End If
End If
End Sub



Private Sub Command2_Click()
main.Show
Unload Me
End Sub

Private Sub Form_Load()

CRViewer91.Visible = False
Command2.Visible = False
Set cn = New ADODB.Connection
With cn
.Provider = "microsoft.jet.oledb.4.0"
.Properties("jet oledb:database password") = "dips"
.Open App.Path & "\proj.mdb"
End With
Set rs1 = New ADODB.Recordset
sql1 = "select distinct jobno from jobassign"
rs1.Open sql1, cn, adOpenDynamic, adLockOptimistic
List1.Visible = True
rs1.MoveFirst
Do Until rs1.EOF
List1.AddItem (rs1.Fields(0))
rs1.MoveNext
Loop
rs1.Close
cn.Close
End Sub