MontgomeryPete
Instructor
We are trying to set up a notification system to get patients ready for transportation to a clinic. The ECF staff needs to be notified 1 and 1/2 hours before the patient's appointment.
I have tried this approach:
In the query grid, calculate the "warning time:"
NoticeTime: [AppointmentTime]-(1.5/24). This gives a value 1 1/2 hours before the appointment.
Then I tried in the criteria section of that grid <Now()to act as a modifier for the SELECT statement.
Result: All appointments were returned, not just those within the time range.
Next: using (DateDiff("h",Now(),[NoticeTime]))/24
I used the result in an If statement to set a value equal to "1" and test for it on the criteria section of the query grid. The results were that it set a "1" for every case, regardless of the appointment time.
In this class, my goal is to use examples only in Access and not to use SQL or VB (this class is for nurses, medical technicians, etc.)
Does anyone have any thoughts on this problem?
Thanks and Happy New Year.
I have tried this approach:
In the query grid, calculate the "warning time:"
NoticeTime: [AppointmentTime]-(1.5/24). This gives a value 1 1/2 hours before the appointment.
Then I tried in the criteria section of that grid <Now()to act as a modifier for the SELECT statement.
Result: All appointments were returned, not just those within the time range.
Next: using (DateDiff("h",Now(),[NoticeTime]))/24
I used the result in an If statement to set a value equal to "1" and test for it on the criteria section of the query grid. The results were that it set a "1" for every case, regardless of the appointment time.
In this class, my goal is to use examples only in Access and not to use SQL or VB (this class is for nurses, medical technicians, etc.)
Does anyone have any thoughts on this problem?
Thanks and Happy New Year.