multi access query based on date, user, device

I have an extract of data which I've imported into access which represents represents login/logoff activity of users/pc's. We have some suspicions that officers may be sharing accounts & passwords, which is a breach of policy. I wanted a way in access to query the data , to list all rows of data, ordered by date, whereby on the same day, the same account is logged into more than 1 unique machines. At present the key columns are field1 (the date, in the format dd/mm/yyyy), field 6 (the PC the account is logged onto, which in the format PC12345 for example), and field3 (the users account, in the format of text, username, e.g. jbloggs). If the account is logged into more than one unique PC, on the same day, I would like to see those records for further investigation. What would be the best way to filter the data to list all rows which fit this criteria.
LVL 4
pma111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
Something like:

SELECT T.[DateField], T,[User]
FROM (SELECT DISTINCT [DateField], [User], [Account]) as T
GroupBy T.[DateField], T.[User]
Having Count(T.[Account]) > 1

Open in new window


This would identify the Dates and Users who logged onto more than one PC on the same day.  To get the actual PCs' they were logged onto, you would use:

SELECT yourTable.*
FROM yourTable as T
INNER JOIN (
SELECT T.[DateField], T,[User]
FROM (SELECT DISTINCT [DateField], [User], [Account]) as T
GroupBy T.[DateField], T.[User]
Having Count(T.[Account]) > 1) as Dups 
ON T.[DateField] = Dups.[DateField]
AND T.User = Dups.User

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.