if ur using access backend:
dtpFrom and dtpTo are time controls being used on vb6 frontend
'format date values as MM/dd/yyyy
Dim DtFrom as String, DtTo as String
DtFrom = dtpFrom.Month & "/" & dtpFrom.Day & "/" & dtpFrom.Year
DtTo = dtpTo.Month & "/" & dtpTo.Day & "/" & dtpTo.Year
crptAttnRpt.ReportFileName = App.Path & "\Report\rptAttendance.rpt"
crptAttnRpt.SelectionFormula = "{tblAttendanceLog.AttndDate} >= #" & DtFrom & "# and {tblAttendanceLog.AttndDate} <= #" & DtTo & "#"
crptAttnRpt.Action = 1
crptAttnRpt.Destination = crptToWindow
or else use single quotes instead of # (if backend is not access)