.Open "INSERT INTO tmpDTR ( dDate, EmployeeID, TimeInAM, TimeOutAM, TimeInPM, TimeOutPM, RegularHours, OvertimeHours, Vale )SELECT tblDTR.dDate, tblDTR.EmployeeID, tblDTR.TimeInAM, tblDTR.TimeOutAM, tblDTR.TimeInPM, tblDTR.TimeOutPM, tblDTR.RegularHours, tblDTR.OvertimeHours, tblDTR.Vale FROM tblDTR Where dDate>=#" & dtpFrom.Value & "# And dDate<=#" & dtpTo.Value & "#;", con
.Open "Select * from tmpDTR", con
.Close
End With
con.Close
Set rs = Nothing
Set con = Nothing
End Sub
>>My problem is this code.. Sometimes I have to click the Preview button twice of even thrice to view the exact record that i need to display in datareport?? kindly help me pls??? attached with this thread is the report that im doing..
VB Code:
Private Sub btnPreview_Click()
copyToTempDTR
If DataEnvironment.rsEmployee.State = adStateClosed Then