Is this do-able? Multi-random options

  • Thread starter Thread starter Maarkr
  • Start date Start date
M

Maarkr

I have 12 locations, 4 security checks, and 16 different security check
times. They want to put in a db a months worth of random checks (so they can
see ahead at when they will do them), performed 3 per day, and sign off that
it was completed. IE, day 1 has location A doing check B at 11:00, location
C doing check A at 15:00, location F doing check B at 09:00; day 2 has ...
I've used the randomizer code to query random locations, checks, and times
from their own tables, but how do I put this it a table so users can check
off completion? I've looked at building an array and maybe a recordset, but
it's more than I'm capable of doing. Any ideas?
 
Maarkr,

From my perspective, having been a security guy at one point in my life, I
would never want anyone to know where my "random" checks were going to be 30
days in advance. If this got into anyone's hands, they could simply
circumvent my security checks. And checking only 3 locations a day, out of
12, means that it could be 4 or 5 days between checks of some locations.
Not very security conscious in my book.

I'm sure that this is not really as simple as random times and locations.
There are probably rules such as:

1. Cannot check the same location twice in one day
2. Must have at least X hours between checks (this might be based on the
distance between locations)
3. Assuming you are doing only 3 checks per day, cannot check the same
location more than twice in a week.

Once you have defined these rules, you can write some code that generates
your security check table. I would store the date, Time, location, and
initials of the person that completed the check.

Dale
 
Use three tables - Locations in a one-to-many with check records.
Location ---
LocationID - primary key
Point - text
Rmks - text
--- 12 records

Checks ---
CheckID - primary key
CheckType - text - 1 of 4 types
CheckTime - DateTime - 1 of 16 time of day
---- 4 * 16 for 64 records

SecurityCks ---
SecCkID - primary key
LocationID - foreign key
CheckID - foreign key
CkDateTime - DateTime - Date added to CheckTime from SecurityCks record

Append a months records (three per day) using Location and Checks table
combinations
 
Back
Top