Dear Dragan,
It was funny about 0.02... however, my appointment is developed "graphically", so couple of pixels is important.
Actually, your approach can be done in grid format very quickly, which I'd already done. Forbidden double-booking is not possible, the doctors love to fill his/her appointment fully, even they went out everyday. Also, in Multiple doctors situation, the clients may want to see who is available in particular time slots. Therefore, overlapping is inevitable in my case.
Actually, the idea grows when I brought my iBook G4 about 2 years ago, I have been using iCal since then. The simple, nice interfaces is so adorable... in fact, I've pretty much finished my appointment booking interface now...
Concerning the management of double-booking, I just need to re-position the Editbox right a bit, since I knew it is doubled if the time slots occuppied overlapped with previous one (SQL-statement can do that), like so:
t1 = appt.apptTime1
t2 = appt.apptTime2
SELECT distinct appt_id FROM appt WHERE appttime1 <= t1 AND ((t1 between appttime1 AND appttime2) OR (t2 between appttime1 AND appttime2)) INTO CURSOR t4
IF RECCOUNT('t4')>0
GO BOTTOM in t4
nLeft = nLeft+7*RECCOUNT('t4')
ENDIF
USE IN T4
Best regards,
Aaron Chu
********************************************************
Working with Visual FoxPro is a lot of FUN!
********************************************************