time issue

G

Guest

I have a table of information where I log an employees name, a role they have
done, what time they did it, and the date....

I have built a query on this to search by a) what department the employee is
on b) a filter if some of the roles c) roles again (but thistime its a count
of howmany items and d) a filter on todays date using Date(). This works
fine.

The results work like this

Joe Bloggs Role A 12 items (the date)
Joe Bloggs Role B 2 items (the date)

and so on.


The problem is I want to do a search for the past hour for the same
criteria. I copied the above, pasted it, renamed it and inserted the time
field from my table. then input Between DateAdd("h",-1,Time()) And
Time() in the Or line. This kind of works, it brings up all the desired
fields for the past hour.....BUT the results now show as follows

Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)
Joe Bloggs Role A 1 items (the date)

And so on, it no longer groups all the role types together. This is the
diffrence in printing 2 pages worth of reports and about 50.

Any ideas people.

Cheers

Chris
 

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