Re: How to script this
From: Rick B (anonymous_at_discussions.microsoft.com)
Date: 07/28/04
- Next message: Amy: "Re: Limiting a record in a subform"
- Previous message: Dave F: "Re: How do I turn off prompts for security warnings in Access 2003"
- In reply to: James: "How to script this"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Jul 2004 10:14:08 -0500
One post please.
"James" <fake@email.com> wrote in message
news:e3EaUILdEHA.244@TK2MSFTNGP12.phx.gbl...
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
"James" <fake@email.com> wrote in message
news:O$EBedBdEHA.2376@tk2msftngp13.phx.gbl...
> 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
- Next message: Amy: "Re: Limiting a record in a subform"
- Previous message: Dave F: "Re: How do I turn off prompts for security warnings in Access 2003"
- In reply to: James: "How to script this"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|