Time Expired on a Service Record to Calculate SLA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to calculate the time a service record falls outside an SLA.
I have the following fields in my form;

Call Opened (Time field)
Call Closed (Time Field)
Priority (List 1 to 5)

I would like a field that takes the priority eg. 1 would be = 4hrs from Call
Opened, 2 would be 8hrs from Call Opened.

Can you tell me how, where and what I need to write in VBA and/or the
expression and where I insert in which field so that I have this function.
How can I get the form to determine the level and calculate the Call Opened
time + the aditional hours based on the level e.g Priority 1, 2 etc.

Please be aware I am a novice with Access and have no programming experience.

Any help would be most appreciated.

Thanks.
 
Without any coding experience, this may be a little difficult for you. Also,
not know enough about where you are going to do the calculation, where it is
going to be stored, and how you know what the start time is, it is diffiult
to give you an exact example that will meet your needs. However, as food for
thought, here is some code that will do the calculation based on your
description. What happens in this code is that it takes the Call Opened time
and adds 4 hours for priorty 1 and eight hours for priority 2:

If intPriority = 1 Then
intHrs = 4
Else
intHrs = 8
End If
dtmSLATime = DateAdd("h",intHrs,dtmCallOpened)
 
Klatu,

Thanks for this but, where in the field do I place this. I have been told
previously to put in the'Beforeupdate' field?? is this correct
 
In the Before Update event should be correct. Please try to use the correct
terminology so we can understand. A field is part of a table. An event is
something that happens because some circumstance caused it. A control is an
object on a form or report.
 
Hi Klatuu,

I entered the code as an event procedure in the "before update" but it does
not work.

I assume I need to enter the code in my OOR Time. I place the form in design
view, double click on the OOR Time and enter the code from there, is this
correct.

I would really appreciate a more detailed explanation of what I need to do
if you would be so kind.

Thanks in anticipation.

Colin
 
Klattu,

Just a thought, any chance of you providing a form with the example on. I am
on broadband so not a problem to download. I think this would be easier for
me to see and understand.

Thanks again.

Colin.
 
No, I don't have an example.
Post back your E-mail address, and I will give you instructions on sending
me your form, table or tables, and any queries the form uses.
 
Back
Top