Hi...
This code assumes that you know Data Report and Data Environment and SQL also.
Here is the sample code:
DE_DTR-name of Data Environment
SqlTran_PDay-name of SQL declared on DE_DTR
dtPic.Value -Date Picker
This is a snippets from my DTR System it displays data based from the given date.(dtPic.Value ).
NOTE:This will re-written your SQL on SqlTran_PDay in DE_DTR
Private Sub CmdDaily_Click()
If DE_DTR.Recordsets("SqlTran_PDay").State = adStateOpen Then DE_DTR.Recordsets("SqlTran_PDay").Close
DE_DTR.Commands("SqlTran_PDay").CommandText = _
"SELECT t.TransacID,t.EmpID, " & _
"t.TimeIN,t.TimeOut," & _
"t.Tran_Date,t.Remarks, " & _
"e.EmpID,e.Last_Name,e.First_Name,e.Middle,e.BCode ID " & _
"FROM TBL_Tran_DTR t " & _
"INNER JOIN TBL_EmployeeMaster e ON " & _
"t.EmpID = e.EmpID " & _
"WHERE t.Tran_Date =#" & dtPic.Value & "#"
DtaDaily.Show 'Displays the DataReport
End Sub
I wish i could help you better by emailing some sample program for this...
If you still have questions or any further question for this matter...
Feel free to asked.
Friend...
GoodLuck