Full Version: IIf Statement not allowing currency format
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
aviccaro
HI,

I'm using an IIf statement in a calculated field in a query, and the result won't give the option of changing the format of the field. This is the statement:

FOBCost2: IIf(tblQuotes!FOB="Delivered",[FOBCost],"0")

FOB is a text field and FOBCost is a currency field. Is there any way to fix this so that the result can be set to currency as well?

Thanks,

Adam
pbaldy
Try dropping the quotes around the zero so it's not treated as text.
Alan_G
If Pauls suggestion doesn't work, maybe...........

FOBCost2: FormatCurrency(IIf(tblQuotes!FOB="Delivered",[FOBCost],0))
aviccaro
Dropping the quotes worked great!

Thank you for your fast responses!

Adam
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.