N
ncdavis25 via AccessMonster.com
Hi, I'm having difficulty with the sql listed below. I'm trying to produce
daily duplicate dates and times. The database tardyscans has a field called
datetime in it that shows the date and time the student came in, but there is
no separate field for date and time. When I run the query is asks me to
enter the parameter value for the date, then for tardyscans.date and then for
tardyscans.time. I'm not sure where I went wrong. Can anyone help me.
SELECT TardyScans.SID, TardyScans.Date AS Expr1, TardyScans.Time AS Expr2,
TardyScans.Reason, TardyScans.Resolution
FROM TardyScans
WHERE (((TardyScans.SID) In (SELECT [SID] FROM [TardyScans] As Tmp GROUP BY
[SID],[Date] HAVING Count([SID])>1 And Format([Date],"mm/dd/yy")= Format(Date
(),"mm/dd/yy"))) AND (([TardyScans].[Date])=Format(Date(),"mm/dd/yy")))
ORDER BY TardyScans.SID, TardyScans.Date, TardyScans.Time;
daily duplicate dates and times. The database tardyscans has a field called
datetime in it that shows the date and time the student came in, but there is
no separate field for date and time. When I run the query is asks me to
enter the parameter value for the date, then for tardyscans.date and then for
tardyscans.time. I'm not sure where I went wrong. Can anyone help me.
SELECT TardyScans.SID, TardyScans.Date AS Expr1, TardyScans.Time AS Expr2,
TardyScans.Reason, TardyScans.Resolution
FROM TardyScans
WHERE (((TardyScans.SID) In (SELECT [SID] FROM [TardyScans] As Tmp GROUP BY
[SID],[Date] HAVING Count([SID])>1 And Format([Date],"mm/dd/yy")= Format(Date
(),"mm/dd/yy"))) AND (([TardyScans].[Date])=Format(Date(),"mm/dd/yy")))
ORDER BY TardyScans.SID, TardyScans.Date, TardyScans.Time;