Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare Record in Table with Previous Record

Status
Not open for further replies.

thomsons

Programmer
Dec 16, 2002
19
0
0
GB
I have a table in Access2000 (tblLogins) that has 2 columns, one with Login Details (Login) and the other with User ID's (Username)

e.g.

Login Username
20020729082158 Admin
20020729082258 Admin
20020729082420 Admin
20020729083500 Tester
20020729083539 Tester
20020729110013 Tester

What I am trying to do is extract the last login details for each user to another table using VBA

Any assistance would be greatly appreaciated.

Rgds,
S.
 
How typical, after I submitted this post I managed to get a piece of code to work:-

DoCmd.RunSQL "SELECT MAX(tblLogins.Login), tblLogins.Username " _
& "INTO [tblLogins2] FROM tblLogins " _
& "GROUP BY tblLogins.Username"


Shaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top