I am trying to add a new appointment to see if it will overlap with any existing ones in my grid columns, I have created a startdate field and enddate field in my appointment table. (data types are DatTime)
The key is to search startdate.alias and endate.alias to see if an overlap exists, If so, don’t permit the data entry and alert the user that the appointment date overlaps with another. Otherwise permit the new appointment entry.
I have a function provided by Olaf that I am using but i dont know how to code it so it works with the function below
Function Overlap(ttStartDateTime1,ttEndDateTime1,ttStartDateTime2,ttEndDateTime2)
Local llOverlap
llOverlap = ;
Between(ttStartDateTime2, ttStartDateTime1, ttEndDateTime1)OR;
Between(ttEndDateTime2 , ttStartDateTime1, ttEndDateTime1)
Return llOverlap EndCase
please help
Thanks
Mike
The key is to search startdate.alias and endate.alias to see if an overlap exists, If so, don’t permit the data entry and alert the user that the appointment date overlaps with another. Otherwise permit the new appointment entry.
I have a function provided by Olaf that I am using but i dont know how to code it so it works with the function below
Function Overlap(ttStartDateTime1,ttEndDateTime1,ttStartDateTime2,ttEndDateTime2)
Local llOverlap
llOverlap = ;
Between(ttStartDateTime2, ttStartDateTime1, ttEndDateTime1)OR;
Between(ttEndDateTime2 , ttStartDateTime1, ttEndDateTime1)
Return llOverlap EndCase
please help
Thanks
Mike