R
rigby
Hi
I am trying to attempt some code. I want to have a condition where, if it
isnt met, access will pop up an error message explaining why it isnt allowed.
I have these controls involved:
[Start Date], [End Date], [Time on Duty], [Time off Duty].
when 'end date' = 'start date', i want time on duty to HAVE to be less than
'time off duty. i have another control which is working great which
calculates total hours worked like this:
=Round(IIf((DateDiff("n",[Time on Duty],[Time off
Duty])/60)<0,(DateDiff("n",[Time on Duty],[Time off
Duty])/60)+24,(DateDiff("n",[Time on Duty],[Time off
Duty])/60)),2)+((DateDiff("d",[Start Date],[End Date])*24))
it doesnt work when an incorrect time has been put in the 'time on duty'.
how may i create a condition for this?
Thank you
Rigby
I am trying to attempt some code. I want to have a condition where, if it
isnt met, access will pop up an error message explaining why it isnt allowed.
I have these controls involved:
[Start Date], [End Date], [Time on Duty], [Time off Duty].
when 'end date' = 'start date', i want time on duty to HAVE to be less than
'time off duty. i have another control which is working great which
calculates total hours worked like this:
=Round(IIf((DateDiff("n",[Time on Duty],[Time off
Duty])/60)<0,(DateDiff("n",[Time on Duty],[Time off
Duty])/60)+24,(DateDiff("n",[Time on Duty],[Time off
Duty])/60)),2)+((DateDiff("d",[Start Date],[End Date])*24))
it doesnt work when an incorrect time has been put in the 'time on duty'.
how may i create a condition for this?
Thank you
Rigby