If Then Else - PLEASE HELP

C

Cadburys

Hi all

I have a db that is used to log work received by various clients and the
progress of each "job". Each job has a deadline time, deadline date and also
a priority. Based on the priority I want to automatically populate the
deadline time and deadline date fileds on the job form.

One client requires a turnaround of 3 hours - regardless of priority.
6 clients have a 10pm deadline
and the rest are as follows

Urgent priority is time received plus 2 hours

Normal priority is a bit more complicated
- if the job is received between 8am and 11.30am then the deadline is 4pm
- if the job is received between 11.30am and 4.30pm then the deadline is
9.30 am the next day
- if the job is received between 4.30pm and 8am then the deadline is 12pm
(the next day for jobs received between 4.30pm and 12am, and sameday for jobs
received between 12am and 8am)

Another factor that is making this more complicated is that the deadline
time is based on UK Time and we are in SA. So at the moment we are 1 hour
ahead in SA but in winter we are 2 hours ahead. and the clock changes on
different dates each year!!!!

Now is it possible to use the if then else in VB to do the above and if yes
then HOW????

Any help or guidence would be appreciated.
 
T

Terry

You are not going to be able to do this unless your underlying table
structures are correct.

From what I can determine from your posted details:

You need to store at least 4 (6 is better for redundancy) time bands in a
table of Priorities plus a Turnaraound time. This will give you what you
need to check for your priorities.

You will need to have something in your client table, at least start and end
times, plus their Turnaround time. Your clients requirements take precedence
over the Priorities table settings. You will also need to store time-zone
hour differences for each client and base them on GMT.

As to how you can get GMT time, you will need to research this as to how to
get it off the internet. A possible easy way, I'm guessing, is to run the
application on a machine set to GMT (use w32time to sync to a suitable time
source).

Hope this gives you some pointers.

Regards




Regards
 
A

ADG

To get you started.

Each clinet should have a client record in a client table to set a servicce
level. Make this an integer value. Then look at the select case statement in
the help text. You can look up the service level and use this to run the code
for each type of client. this will make your if then else statements easier
to code.

regards
 

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