How to script this

J

James

Ok, I have a access database(from ISA Server)

It has a username and a time in HH:MM:SS format.
It logs the time when the user goes on the internet, and when they aren't
browsing no times are logged.

What I want to do is find out how long they are one for. For example say
the first time i have logged for them is at 8am and the last time i have
logged for them is 5pm.

Now from 8 to 5 is 9 hours, obviously they weren't nescesarily online for 9
hours. I want to total the time they were online, BUT if there is a gap of
more then 5 minutes between logged time, i don't want to count that
time....make sense? What type of code what I need to do to acomplish
this???

Thanks


Heres basically what i'm trying to do, but don't know how to code.

START
Set Time1= currentrecord.time
go to next record
Set Time 2 = currentrecord.time
Set Start time to Time1
Set End time to Time2

Do While Time1 + 5 > Time2

(Go to next record
Set Endtime = Time2
Set Time1=Time2
Set Time2 = Currentrecord.time)

Else
Set Sum = Endtime - Start Time
Set Total = Total + Sum
Set Start Time = Time2
Go to next record
Set Time1 = Time2
Set Time 2 = CurrentRecord.time

If End of Records
Display Sum

Else Go back to first Do While

I know this is rough, but its basically what i want to do, could anyone help
me code this for acces, I've never used access, so I really don't know where
to start....thanks
 
R

Rick B

One post please.


Ok, I have a access database(from ISA Server)

It has a username and a time in HH:MM:SS format.
It logs the time when the user goes on the internet, and when they aren't
browsing no times are logged.

What I want to do is find out how long they are one for. For example say
the first time i have logged for them is at 8am and the last time i have
logged for them is 5pm.

Now from 8 to 5 is 9 hours, obviously they weren't nescesarily online for 9
hours. I want to total the time they were online, BUT if there is a gap of
more then 5 minutes between logged time, i don't want to count that
time....make sense? What type of code what I need to do to acomplish
this???

Thanks


Heres basically what i'm trying to do, but don't know how to code.

START
Set Time1= currentrecord.time
go to next record
Set Time 2 = currentrecord.time
Set Start time to Time1
Set End time to Time2

Do While Time1 + 5 > Time2

(Go to next record
Set Endtime = Time2
Set Time1=Time2
Set Time2 = Currentrecord.time)

Else
Set Sum = Endtime - Start Time
Set Total = Total + Sum
Set Start Time = Time2
Go to next record
Set Time1 = Time2
Set Time 2 = CurrentRecord.time

If End of Records
Display Sum

Else Go back to first Do While

I know this is rough, but its basically what i want to do, could anyone help
me code this for acces, I've never used access, so I really don't know where
to start....thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top