IIf Statement in Access Project

B

BK

I am moving an mdb over to sql and creating an adp file for the front
end. In the original mdb I had a query with a field that did the following:

SalesAccount: IIf(TaxCodes.TaxCode="whse","311004","311504")

Basically if the taxcode for the job was listed as wholesale it would
output one Sales Account, if it wasn't then it would output the other.
Well it seems that the access project does not like this. When I type
in the same thing, without the leading SalesAccount:, it surrounds it
with quotes and takes it as a literal or says iif is not a valid
function. What can I do to get the same result that I did in the mdb?

TIA,
Bill
 

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