idea about some code (1 Viewer)

I-1

New member
Local time
Today, 06:14
Joined
Oct 23, 2005
Messages
9
Hi,

If you look in the database below posted ...there is a table that keeps a track that logs the user that logged in and logged out.

What I want to do is based on the last userID logged in show reports for that specific users.

LogID UserID LoggedIn LoggedOut
17 5 10/28/2005 11:33:21 AM


Can someone help we write the code that can do this?

Thanks,
 

Attachments

  • LogOnExample.zip
    90.5 KB · Views: 108
Last edited:

boblarson

Smeghead
Local time
Today, 06:14
Joined
Jan 12, 2001
Messages
32,059
Made some changes to your query structure and your report and now it gives you the last login for each user type.
 

I-1

New member
Local time
Today, 06:14
Joined
Oct 23, 2005
Messages
9
Hi,

where can I find the database with the changes?

Thanks,
 

boblarson

Smeghead
Local time
Today, 06:14
Joined
Jan 12, 2001
Messages
32,059
Sorry, I thought it had attached.
 

Attachments

  • LogOnExample_revised.zip
    119.9 KB · Views: 94

I-1

New member
Local time
Today, 06:14
Joined
Oct 23, 2005
Messages
9
Hi Bob,

Can you please explain what you did ...because i dont understand this...

thanks,
 

boblarson

Smeghead
Local time
Today, 06:14
Joined
Jan 12, 2001
Messages
32,059
The first thing is to create a query that pulls the maximum date/time from the log. Then, use that one with the other query that you had already created to tie them together so that it would ONLY pull the one record that you had identified with the max query. You have to ensure that all common fields are linked together in a select only those records that match, so that you get the one record for each group that is the latest log in.

Then, I changed the recordsource of your report to the query that had tied the two queries together.

I hope that helps.
 

Users who are viewing this thread

Top Bottom