Hello,

I am need of a little help.

I am currently working on an application that records time when someone logs in and logs out of the system.

I have the data of login and logout going into an access database through VB6.

My database table has columns like Username,SystemDate,LoginTime,LogoutTime,TotalHours.

Now the problem I have is, I want to insert a code that will check the database for login on consecutive days(past 5 logins should be checked).

If the last 5 logins turn out to be on consecutive days then I have to consider the current login as overtime.

Please let me know if there are any built in functions that I can use for the same.

Note: The consecutive days should be any 5 consecutive days in the month. Not necessarily in a single week.

Any help on this would be greatly appreciated.