I am not sure why you are tracking sessions this way since no records are being kept. That being said, what I would do is the following:
Create a small table with a single date field in it, called dtDate (PK date field)
When a user opens the app and the main form comes open, on the main form's On Load event, put code to check for today's date in the date table. If today's date is not in the table, run a delete query on the session table, and then PUT TODAY's DATE in the DATE TABLE!
So each user does this check every time they open the database, but only the first person in each day actually runs the delete query.
Did that help? Do you need help with the code?
mmcdonal
|