hi.. here's my code, but when i run my program, an error message "A number is required here ( on the red part). my declaration for NempID is integer...

VB Code:
  1. Dim CrReport As CRAXDRT.Report
  2. Dim appCr As CRAXDRT.Application
  3. Set CrReport = New CRAXDRT.Report
  4. Set appCr = New CRAXDRT.Application
  5.  
  6. Set CrReport = appCr.OpenReport("c:\Documents and Settings\francis\Desktop\PC Inventory System\report\rptEmpMonitoring.rpt")
  7. [COLOR=Red]CrReport.RecordSelectionFormula = "{tEmployee.EmpID}='" & NEmpID & "'"[/COLOR]
  8. CR.ReportSource = CrReport
  9. CR.ViewReport