I am loading a crystal report via VB6 and the report is going to show mobile phone numbers and ICCID numbers, Using the following code I can get the report to show the first 1000 mobile numbers. But if I want to get the report to show a different range of numbers it just brings back the same set of 1000 numbers

VB Code:
  1. Private Sub Form_Load()
  2.  
  3. Dim Appl As New CRAXDRT.Application
  4. Dim Report As New CRAXDRT.Report
  5. Dim Rs As ADODB.Recordset
  6. Dim Conn As Connection
  7. Dim strSQL As String
  8.  
  9. Set Conn = New Connection
  10.  
  11. With Conn
  12.     'Set up an ODBC connection to Cerillion to the database defined in SystemDSN
  13.     .ConnectionString = "Provider=OraOLEDB.Oracle;User Id=Super;Password=Password;Data Source=" & ServerName & ";"
  14.     'Open the ODBC connection
  15.     .Open
  16.  
  17. End With
  18.  
  19. If frmJTPrint.optAll = True Then
  20.  
  21.     strSQL = "select Access_NO,ICCID from Test_Dec_Puk_Details tdPD, Test_Dec_GSM_PP_Access_Numbers tdGPAN where tdPD.ICCID = Ltrim(tdGPAN.Assoc_Access_No) and ICCID_Full = '" & FileIDToPrint & "'"
  22.  
  23. ElseIf frmJTPrint.optPhoneNumberRange = True Then
  24.  
  25.     strSQL = "select Access_NO,ICCID from Test_Dec_Puk_Details tdPD, Test_Dec_GSM_PP_Access_Numbers tdGPAN where tdPD.ICCID = Ltrim(tdGPAN.Assoc_Access_No) and ICCID_Full = '" & FileIDToPrint & "' and Access_NO >= '" & tempFrom & "' and Access_NO <= '" & tempTo & "'"
  26.  
  27. End If
  28.  
  29. Set Rs = New ADODB.Recordset
  30. Set Rs = Conn.Execute(strSQL)
  31. Set Appl = New CRAXDRT.Application
  32. Set Report = Appl.OpenReport(App.Path & "\Labels.rpt", 1)
  33. Report.Database.SetDataSource Rs, 3, 1
  34.  
  35. CRView.Refresh
  36.  
  37. CRView.ReportSource = Report
  38. CRView.ViewReport
  39. End Sub
I am using two sql statements (one for "All" mobile numbers to be shown with a specific ID and one for a range of numbers, from A to B)
These dont seem to be working, any help would be appreciated

Thanks