I would think that you could check the table and see if there were any
records for the current date or later. If not, delete all the records in
the table.
Something like the following
If DCount("*","SomeTable","DateTime>= Date()") = 0 THEN
Currentdb().Execute ("DELETE * FROM SomeTable")
End IF
That code could be executed whenever someone launches the database, so you
would not have to do something complex to determine if they were the FIRST
one on that date to open the database.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Jez" <(E-Mail Removed)> wrote in message
news:6BA3030F-6187-47DE-977B-(E-Mail Removed)...
>I am trying to understand if this is possible...
>
> I currently have a table called tblSession. This inputs the User,JobNumber
> user is currently viewing & DateTime. from this, everytime a User goes
> into a
> Job then it populates the table with the JobNumber and when the User goes
> into another Job it deletes the previous Job Number and replaces it with
> the
> next Job Num. What I am wanting to do is that no one would really be in
> the
> Database between 8PM & 7AM, I want to try and see if the first person in
> the
> database it runs a query and deletes any sessions that are still showing
> in
> the table, How is this possible?
>
|