hi experts please help me with this code
Private Sub cmdreport_Click()
Set crApp = New CRAXDRT.Application
frmViewReport.Show
Set adorsRAM = New ADODB.Recordset
Set report = crApp.OpenReport("D:\Ankush\created\proj11\Reports\Report1.rpt")
sSQL = "Select type, user, location, cpu_no, model, speed, ram_unit from Master where RAM=" & Form1.cmbram.Text
report.ParameterFields.Item("pRAM").Value = Str(cmbram.Text)
report.DiscardSavedData 'CLEARS REPORT SO WE WORK FROM RECORDSET
report.Database.Tables(1).Location = "D:\Ankush\created\proj11\Database\IT_Stock.mdb"
report.Database.Tables(1).TestConnectivity
Set datacmd1 = New ADODB.Command
Set datacmd1.ActiveConnection = cn
datacmd1.CommandType = adCmdTable
From adorsRAM
report.Database.SetDataSource adorsRAM 'LINK REPORT TO RECORDSET
frmViewReport.CRViewer.ReportSource = report 'LINK VIEWER TO REPORT
frmViewReport.CRViewer1.ViewReport 'SHOW REPORT
Do While CRViewer.IsBusy 'ZOOM METHOD DOES NOT WORK WHILE
'adorsRAM.Close
'Set adorsRAM = Nothing
End Sub
please check if there is any error and help me in correcting the error
Thanks in advance