Status Query

  • Thread starter Thread starter SJL
  • Start date Start date
S

SJL

Hi
I have a table with Requests in it and want to run a report based on a query
that will show rejected request by date. I have set up the query to search by
date range ( Between [ ] And [ ] and put in the Status column "Rejected".
When I run query nothing happens. Help please???
 
Post the SQL view of your query here. And "nothing happens" is not very
specific. Do you mean no records are found?
 
Hi Ted,

Apologies. I did indeed mean no records appear.

I think this is the SQL view you mean.
SELECT DISTINCTROW TandE.[Date Requested], TandE.[Name of Traveller],
TandE.[reason for Travel], TandE.Other, TandE.Status, Sum(TandE.[Cost £'s])
AS [Sum Of Cost £'s], Count(*) AS [Count Of TandE]
FROM TandE
GROUP BY TandE.[Date Requested], TandE.[Name of Traveller], TandE.[reason
for Travel], TandE.Other, TandE.Status
HAVING (((TandE.[Date Requested]) Between [Start Date ?] And [End Date ?])
AND ((TandE.Status)="Rejected"));


tedmi said:
Post the SQL view of your query here. And "nothing happens" is not very
specific. Do you mean no records are found?
--
TedMi

SJL said:
Hi
I have a table with Requests in it and want to run a report based on a query
that will show rejected request by date. I have set up the query to search by
date range ( Between [ ] And [ ] and put in the Status column "Rejected".
When I run query nothing happens. Help please???
 
SJL said:
Apologies. I did indeed mean no records appear.

I think this is the SQL view you mean.
SELECT DISTINCTROW TandE.[Date Requested], TandE.[Name of Traveller],
TandE.[reason for Travel], TandE.Other, TandE.Status, Sum(TandE.[Cost £'s])
AS [Sum Of Cost £'s], Count(*) AS [Count Of TandE]
FROM TandE
GROUP BY TandE.[Date Requested], TandE.[Name of Traveller], TandE.[reason
for Travel], TandE.Other, TandE.Status
HAVING (((TandE.[Date Requested]) Between [Start Date ?] And [End Date ?])
AND ((TandE.Status)="Rejected"));


Change the HAVING clause to a WHERE clause.

I suspect that you may also want to remove the [Date
Requested] field everywhere else.
 
Back
Top