Can I do time calculations in Access? I know I can in Excel, and I can do date calculations in Access but I can't find anything in Help about time calculations short of writing code. I haven't used Access in over 10 years and never did much with VB.
What I want to do specifically is update a checkbox when a time on a form is anything less than another time + 1 hour on the form.
A submission window is 12:00PM to 3:00PM. If a submission is made by 1:00PM or sooner a credit is earned.
UPDATE Personnel_Actions SET Personnel_Actions.Early_PR_Credit_Earned = Yes
WHERE (((Personnel_Actions.PA_ID)=[Forms]![PPI_Main_Form].[PA_ID]) AND (([Forms]![PPI_Main_Form].[Time_PR_Rcvd])<=([Forms]![PPI_Main_Form].[PR_Time_Beg_Slot]+1)));
This query updates the checkbox regardless of the value in the +1 position whether the submission time is 1 minute or 2 hours past the "credit earned" window.
I use a similar update query to set flags using this method with no problem (date_field + 14 for example).
Am I trying to do something that can't be done in Access without code?
What I want to do specifically is update a checkbox when a time on a form is anything less than another time + 1 hour on the form.
A submission window is 12:00PM to 3:00PM. If a submission is made by 1:00PM or sooner a credit is earned.
UPDATE Personnel_Actions SET Personnel_Actions.Early_PR_Credit_Earned = Yes
WHERE (((Personnel_Actions.PA_ID)=[Forms]![PPI_Main_Form].[PA_ID]) AND (([Forms]![PPI_Main_Form].[Time_PR_Rcvd])<=([Forms]![PPI_Main_Form].[PR_Time_Beg_Slot]+1)));
This query updates the checkbox regardless of the value in the +1 position whether the submission time is 1 minute or 2 hours past the "credit earned" window.
I use a similar update query to set flags using this method with no problem (date_field + 14 for example).
Am I trying to do something that can't be done in Access without code?