A
a1_robs via AccessMonster.com
Hi All,
I know some of your guys and gals out there like a challenge, so how about
this one for you!
I am creating a database to record maintenance requests that come in from
customers from four buildings. The three tables (with their fields in
brackets) are:
"Callers" - List of callers (CallerID, FirstName, Surname, ExtNo, Email)
"Priorities" - Priority level for jobs and the expected response times
(Priority, AddDays, AddHours)
"ReactiveMaint" - List of maintenance requests (CallNo, Time, Date, CallerID,
Location, Priority, Problem, CompletedDate, CompletedTime).
What I need to do is work out when a 'call' is due, based on the Time and
Date it was logged, depending on the Priority level it was allocated.
Priority levels are as follows:
Priority 1 = 0 Days, 2 hours
Priority 2 = 0 Days, 4 Hours
Priority 3 = 1 Day
Priorty 4 = 5 Days
Priority 5 = 30 Days
The form I use to log the calls is called "CallLogger", and whose control
source is from a query called ReactiveMaintAll (which links all three tables).
The 'Priority' for each call is allocated via a combo box in "CallLogger"
whose row source is the "Priorities" table, which looks like this:
Priority AddDays AddHours
1 0 1
2 0 4
3 1 0
4 5 0
5 30 0
To get me going, I have put an unbound text box in the form "CallLogger" with
the following code:
=DateAdd("w",[AddDays],[Date])
This works well for just adding the number of days to a call. The problem is
that I need to exclude weekends (not worried about holidays), and also work
out the time due if it is a Priority 1 or 2.
If anyone can figure out a way to do this, I will love you forever and will
worship the ground you walk on.
Rob.
I know some of your guys and gals out there like a challenge, so how about
this one for you!
I am creating a database to record maintenance requests that come in from
customers from four buildings. The three tables (with their fields in
brackets) are:
"Callers" - List of callers (CallerID, FirstName, Surname, ExtNo, Email)
"Priorities" - Priority level for jobs and the expected response times
(Priority, AddDays, AddHours)
"ReactiveMaint" - List of maintenance requests (CallNo, Time, Date, CallerID,
Location, Priority, Problem, CompletedDate, CompletedTime).
What I need to do is work out when a 'call' is due, based on the Time and
Date it was logged, depending on the Priority level it was allocated.
Priority levels are as follows:
Priority 1 = 0 Days, 2 hours
Priority 2 = 0 Days, 4 Hours
Priority 3 = 1 Day
Priorty 4 = 5 Days
Priority 5 = 30 Days
The form I use to log the calls is called "CallLogger", and whose control
source is from a query called ReactiveMaintAll (which links all three tables).
The 'Priority' for each call is allocated via a combo box in "CallLogger"
whose row source is the "Priorities" table, which looks like this:
Priority AddDays AddHours
1 0 1
2 0 4
3 1 0
4 5 0
5 30 0
To get me going, I have put an unbound text box in the form "CallLogger" with
the following code:
=DateAdd("w",[AddDays],[Date])
This works well for just adding the number of days to a call. The problem is
that I need to exclude weekends (not worried about holidays), and also work
out the time due if it is a Priority 1 or 2.
If anyone can figure out a way to do this, I will love you forever and will
worship the ground you walk on.
Rob.