Hello experts,
Ive been thinking my hole Time overlap through and I noticed a small problem. If a customer cancels appointment, I wouldnt want the user to have the ability to delete the appointment. Rather then delete i decided to add a status called CANCELLED, but if this appointment is cancelled with anticipation other customers must be able to book for that time period without overlap. How would I do this
here is the time overlap code
SELECT *;
FROM Appointment;
WHERE dtNewStart < Appointment.Enddate AND ;
dtNewEnd > Appointment.Startdate AND ;
dtNewstart <> Appointment.StartDate ; && Uniquely identifies current record &&
INTO CURSOR OverLaps READWRITE
SELECT OverLaps
IF RECCOUNT() > 0
MESSAGEBOX('there is an overlap with an existing appointment' ,16, 'Time Overlap')
ELSE
thisform.save()
ENDIF
ENDCASE
so basically i need to say something like
IF BILLING.STATUS = 'CANCELLED'
then this time is not a overlap
Please Help
Ive been thinking my hole Time overlap through and I noticed a small problem. If a customer cancels appointment, I wouldnt want the user to have the ability to delete the appointment. Rather then delete i decided to add a status called CANCELLED, but if this appointment is cancelled with anticipation other customers must be able to book for that time period without overlap. How would I do this
here is the time overlap code
SELECT *;
FROM Appointment;
WHERE dtNewStart < Appointment.Enddate AND ;
dtNewEnd > Appointment.Startdate AND ;
dtNewstart <> Appointment.StartDate ; && Uniquely identifies current record &&
INTO CURSOR OverLaps READWRITE
SELECT OverLaps
IF RECCOUNT() > 0
MESSAGEBOX('there is an overlap with an existing appointment' ,16, 'Time Overlap')
ELSE
thisform.save()
ENDIF
ENDCASE
so basically i need to say something like
IF BILLING.STATUS = 'CANCELLED'
then this time is not a overlap
Please Help