hi, I am running a scheduling appointment app
(the error message and the type! message are bc there are calculated labels there, so they'll fill with data when there's data entered by the employee, also they are meant to be a hidden feature for the developer(me)). that I am making for a hair salon, it's 75% done but since the start I'm having a collision problem with appoints that I don't manage to solve yet...
well, I made a function to be able to detect and validate if there is a collision when I choose a specified hour,
(Even if I'm telling the program to Exit Sub, it ends up storing the new appointment on the subform) the collision would be made depending on time (i.e. 8:00-9:00 AND 8:30-9:20), but it needs to know what day is where I'm placing the specified appointment, so there are two ways where I can do this...
(This is the logic)(dLowerPrecision/dUpperPrecision it'll measure if a procedure delays or ends earlier)(dDuration is the time of the procedure)(i is a variable, will store time)
I could just tell the cboTime, just count me in the hours that are available for the specified procedure(if there's time available) show me a message box saying there's a collision occurring and exiting the logic(so It can't make the appointment) Well the error message shows, but, It shows ALWAYS even if there's no new appointments in a specified day... so, I wanna know if the logic of the validation function has an error in declaring it. I'd be happy if I just make the message display and the program not adding the appointment

well, I made a function to be able to detect and validate if there is a collision when I choose a specified hour,


I could just tell the cboTime, just count me in the hours that are available for the specified procedure(if there's time available) show me a message box saying there's a collision occurring and exiting the logic(so It can't make the appointment) Well the error message shows, but, It shows ALWAYS even if there's no new appointments in a specified day... so, I wanna know if the logic of the validation function has an error in declaring it. I'd be happy if I just make the message display and the program not adding the appointment
Last edited: