Private Sub Cmd_Print_Click()
'On Error GoTo Error_Handler
If newflag <> 0 Then
MsgBox "Inserting New Record Mode, Press EXIT Button To Return To Normal Mode", vbCritical, "Attention"
Exit Sub
End If
If RepNo.Text = "" Then Exit Sub
Dim Report As New rstoreinmaterial
Report.RecordSelectionFormula = "{DetailsStore_InOut_Material.RepNo}= " & Val(RepNo.Text) & " and {DetailsStore_InOut_Material.projectno} = '" & ProjectNo1 & "'"
Form1.CRViewer1.ReportSource = Report
Form1.CRViewer1.ViewReport
Form1.Show 1
Exit_Error_Handler:
Set rs = Nothing
Exit Sub
Error_Handler:
MsgBox Err.Number & " : " & Err.Description
Resume Exit_Error_Handler
End Sub
how i can fix this error ???