CJBIRKIN
Drink!
- Local time
- Today, 18:30
- Joined
- May 10, 2002
- Messages
- 255
Hi
This is a little complicated. I have had to create a table of Rules that are translated via code into dates and times. I.e staffid, first monday after start of month , 09:00 , 11:00, location 2,rule#.
would create a record containing the staffid , date of the first monday in the month and the times and location 2 and the rule number.
What i am doing is creating a table of these date/times to check that dates and times do not OVERLAP for either the same location or another location.
In this example this is incorrect as the start and end time of the second record "gates" the start time of the first record. So i can't use keys to prevent this from happening.
staffid----SDate-----------Stime-------Etime--------Location------Rule#
----1----23/08/2003------08:00------17:00--------location2-------1
----1----23/08/2003------07:00------09:00--------location1-------2
This is ok
staffid----SDate-----------Stime-------Etime--------Location------Rule#
----1----23/08/2003------08:00------17:00--------location2-------1
----1----23/08/2003------17:50------18:00--------location1-------2
All(!) i need to do is tell the user which rules are incorrect
I am quite happy to use VBA to solve this if you've got any ideas?
Cheers Chris
This is a little complicated. I have had to create a table of Rules that are translated via code into dates and times. I.e staffid, first monday after start of month , 09:00 , 11:00, location 2,rule#.
would create a record containing the staffid , date of the first monday in the month and the times and location 2 and the rule number.
What i am doing is creating a table of these date/times to check that dates and times do not OVERLAP for either the same location or another location.
In this example this is incorrect as the start and end time of the second record "gates" the start time of the first record. So i can't use keys to prevent this from happening.
staffid----SDate-----------Stime-------Etime--------Location------Rule#
----1----23/08/2003------08:00------17:00--------location2-------1
----1----23/08/2003------07:00------09:00--------location1-------2
This is ok
staffid----SDate-----------Stime-------Etime--------Location------Rule#
----1----23/08/2003------08:00------17:00--------location2-------1
----1----23/08/2003------17:50------18:00--------location1-------2
All(!) i need to do is tell the user which rules are incorrect
I am quite happy to use VBA to solve this if you've got any ideas?
Cheers Chris
Last edited: