Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Reports - Get right info on user select (Please Help)


Message #1 by helga@k... on Fri, 22 Feb 2002 10:45:48
To all;

Could someone please help me with the following:

I have a report and the following code in the Initialize event of the 
report:

  Dim strReport As String
  strReport = frmDate.txtStatus.Text

  Dim strDate As Double
  strDate = CDbl(frmDate.DTPicker1.Value)
  
  Dim strQ As String
  strQ = "SELECT TUSER.NAME, TUSER.SURNAME, TUSER.TELEPHONE, 
TRECONREQUEST.DTS, TRECONREQUEST.STATE " & _
         "FROM TUSER, TRECONREQUEST " & _
         "WHERE TUSER.TUSER_ID  = TRECONREQUEST.TUSER_ID " & _
         "AND (TRECONREQUEST.STATE = " & strReport & ")" & _
         "AND (TRECONREQUEST.DTS = " & strDate & ")" & _
         "GROUP BY TUSER.NAME, TUSER.SURNAME, TUSER.TELEPHONE, 
TRECONREQUEST.DTS, TRECONREQUEST.STATE " & _
         "ORDER BY TUSER.SURNAME"
  If DataEnvironment1.rscmdRecReqUnsent.State = adStateOpen Then
    DataEnvironment1.rscmdRecReqUnsent.Close
'    Set DataEnvironment1.rscmdRecReqUnsent = Nothing
  End If
  DataEnvironment1.rscmdRecReqUnsent.Open strQ
'  Set drReconRequestUnsent.DataSource = DataEnvironment1
'  drReconRequestUnsent.DataMember = DataEnvironment1.rscmdRecReqUnsent



  Return to Index