Status Query

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???
 
T

tedmi

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

SJL

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???
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top