Use IFF in access

Teuntja123

Registered User.
Local time
Today, 05:29
Joined
Sep 17, 2013
Messages
21
Hi everybody

Can someone help me with the following:
I want to add the number 1700 in a cell of the column "DeliverTime" when the cell (on the same row) in column WAY_BILL starts with a E.
I made a new query, selected every field from my table to show, and in the column DeliverTime I put behind criteria the following:

IIf(Left([WAY_BILL];1)="E";"1700";" ")

But when I run the query I get:

Data type mismatch in the expression

Can someone tell me what is wrong about my expression?

Thanks in advance,

Teun
 
Show the complete Formula for the DeliverTime column..
 
Thanks Pat, I don't get an error anymore.
The following problem is that I dont see any data, only the headers.
When I remove the criteria I see the data, so it has to be something with the formula I think..
See my attachment for a screenshot.

Probably the solution is simple, my access knowledge is just not so far yet.

Thanks in advance.
 

Attachments

  • access.jpg
    access.jpg
    94 KB · Views: 127
You should not have it in the criteria.. Based on your priginal description, you wanted to Add the value.. So your Query column would be..
Code:
NewDeliveryTime : [AddDockTimes1].[DeliverTime] + IIf(Left([WAY_BILL];1)="E"; 1700; 0)
 

Users who are viewing this thread

Back
Top Bottom