bowieknife
Technical User
All -
I have a time card database that tracks...well, you get the picture. Within the QryTimeCard (fed by TblTimeCard), I have a conditional iif statement that reads:
SunTotal: IIf((([SunTimeOut]-[SunTimeIn])*24)>=8,((([SunTimeOut]-[SunTimeIn])*24)-0.5),(([SunTimeOut]-[SunTimeIn])*24))
and this accounts for a 1/2 hour lunch if the individual works 8 hours or more.
I also have a field for each day in TblTimeCard (Yes/No) that accounts for "No Lunch" (eg. [SunNoLunch], etc.). The intent of this field is that when a user checks this box, it will add .5 hours back to their daily total (eg. [SunTotal] (=([SunTimeOut]-[SunTimeIn])*24). If they uncheck it later, I want it to take the 1/2 hour out of their daily total.
Should this be performed witha form-level macro or a multi-level iif statement in the query?
Thank you in advance.
JB
I have a time card database that tracks...well, you get the picture. Within the QryTimeCard (fed by TblTimeCard), I have a conditional iif statement that reads:
SunTotal: IIf((([SunTimeOut]-[SunTimeIn])*24)>=8,((([SunTimeOut]-[SunTimeIn])*24)-0.5),(([SunTimeOut]-[SunTimeIn])*24))
and this accounts for a 1/2 hour lunch if the individual works 8 hours or more.
I also have a field for each day in TblTimeCard (Yes/No) that accounts for "No Lunch" (eg. [SunNoLunch], etc.). The intent of this field is that when a user checks this box, it will add .5 hours back to their daily total (eg. [SunTotal] (=([SunTimeOut]-[SunTimeIn])*24). If they uncheck it later, I want it to take the 1/2 hour out of their daily total.
Should this be performed witha form-level macro or a multi-level iif statement in the query?
Thank you in advance.
JB