Seasons greetings everyone....tis good to be back since July..
Working away a usual I came across an interesting request. My client wants to set up an automated date generation system for a monitoring areas of their workplace.
To expalin these areas having undertaken a monitoring visit are grade High, Medium or low risk. having undertaken an initial inspection and determined the risk category the client wants to enter the initial inspection date and then depending on the "risk level" have access work out the next visit dates. I though it could be done using (psydocode here) if banding 2 then add weeks to the date. Then I would need to place a further date against the generated on up to 2 years hence.
If the grading was changed on the next vist reclculate according to the params of the new banding and the last visit date
To be truthful - I havent the foggiest how to get anywhere near the first operation. The second I know once I have the trigger will come naturally as it appears to be a similar process.
I know people like to see where your up to so far - And under normal circumstances I would be able to shopw this BUT Im completly in the dark this time -
anyone ever undertaken something lie this before that could give a failing person a guide where to go with this ??
are yoiu using JET as your data stroage.. if so take advantage of the way JET stores dates adding 1 to a current date gives a date + 1 day
so you could store the current test date
store a review code, and int he review code table define how many days that code is valid for, or when that test should be reviewed.
joining the tables together should give a new test date.
other db storage mechanism use different techniques or methods to stroe dates.
I wouldn't store the next review date.. just the last inspection date + what type of risk it is.. form that you know when the next test is due. the one potential problem i can see is if say the inspection regime allows a test to be done, but to run form some unspecified date....
....the reason, say someone decides to chaneg the risk inspection interval, and decides High Risk must be inspected every 6 months.. changing the value in the risk type table means you don't have to chaneg data to get the next test date..
....I will immediately go and headbut a wall for being so stupid....
we all do it sometimes, at a previous place of work we had a "slaphead of the month" award awarded for outstanding contributions to project development, the wrinkle being you had to nominate yourself, you had to make your presentation od why it was more outstandingly dumb thatn others at a the monthly review in a near by bar.
Originally Posted by garethfx
...I sit here totally embarressed at make a clown of myself
thats what Christmas is all about.. you are just getting some practise in early.. old stagers, such as myself don't need the practise, we just are emabarrassing all year round.....