Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display query in ListBox

Status
Not open for further replies.

zaq888

MIS
Jun 2, 2003
46
MY
i have create sql command in dataenvironment... it need to pass the date value.
theproblem is, how can i displays all the data in datalist box?
i have make the rowsource,rowmember,n listfield. but it shows all the data without having any sql generated..
here is code:

Private Sub cmdReport_Click()
buka

End Sub
Sub buka()
Dim a, b, sqlcmd1 As String
a = mula.Value
b = tamat.Value
If DataEnvironment1.rstodayReport.State = adStateOpen Then _
DataEnvironment1.rstodayReport.Close
DataEnvironment1.todayReport a, b
DataReport1.Show ' IF USING DATA REPORT IT DISPLAYS
'THE CORRECT DATA
DataList1.Refresh 'IF USING DATALIST,IT DISPLAY ALL
'THE DATA
End Sub

Can somebody help me. The SQL statement as below :

SELECT TUnit.[cs-username]
FROM TUnit LEFT JOIN [SELECT * FROM Tdata WHERE Tdata.date BETWEEN ? AND ?]. AS MyTempTbl ON TUnit.[cs-username] = MyTempTbl.[cs-username]
WHERE (((MyTempTbl.[cs-username]) Is Null))
ORDER BY Tunit.[cs-username];

? stand 4 datepicker.value.

I'm Keep Studying.... please show the way...
Not Good in English
 
got it.....

I'm Keep Studying.... please show the way...
Not Good in English
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top