Timesheet problem

G

Guest

Okay, I need to write a statement that will return one of two results. In my
jobsite table I have a item OT BIllable. If this item is checked then I want
the total to be the actual number of hours billed. If the answer is no then
I want 40 hours.

I've written the following

=IIf(Jobsites![OT Billable]="Yes",[BillableHours Grand Total
Sum],IIf(Jobsites![OT Billable]="No","40"))

But naturally I'm getting an error as a result.
 
D

Duane Hookom

You shouldn't need the table name since I expect you have only one field
with the name OT Billable. If [OT Billable] is a yes no field, change "Yes"
to <> 0. This expression assumes there is a field or control named
[BillableHours Grand Total Sum].

=IIf([OT Billable]="Yes",[BillableHours Grand Total Sum],40)
OR
=IIf([OT Billable]<>0,[BillableHours Grand Total Sum],40)
 
G

Guest

Perfect, Thanks
--
Lori A. Pong


Duane Hookom said:
You shouldn't need the table name since I expect you have only one field
with the name OT Billable. If [OT Billable] is a yes no field, change "Yes"
to <> 0. This expression assumes there is a field or control named
[BillableHours Grand Total Sum].

=IIf([OT Billable]="Yes",[BillableHours Grand Total Sum],40)
OR
=IIf([OT Billable]<>0,[BillableHours Grand Total Sum],40)

--
Duane Hookom
MS Access MVP


Lori said:
Okay, I need to write a statement that will return one of two results. In
my
jobsite table I have a item OT BIllable. If this item is checked then I
want
the total to be the actual number of hours billed. If the answer is no
then
I want 40 hours.

I've written the following

=IIf(Jobsites![OT Billable]="Yes",[BillableHours Grand Total
Sum],IIf(Jobsites![OT Billable]="No","40"))

But naturally I'm getting an error as a result.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top