Immediate IIF() problem

M

Marc Miller

I have a string field with 'numeric' values (abbas) and another string
field (abbas_sign) that contains the indicator for the value's sign. It
contains
a 'D' if the first field is a positive number or a 'C' if it is negative.

I need to query the table and transform the string values into numeric
output depending on the sign.

Here is my clause:

SELECT Mid(abalc,17,4) AS pt32_acct,
IIF([abbas_sign] = 'D',CDec([abbas]), CDec([abbas]) * -1) as Amount
FROM faloadCO
GROUP BY faloadCO.abalc;

I'm receiving a 'Wrong number of arguments' used in the funtion.

Any help is appreciated.

Thank you for your time;
Marc MIller
 
D

Douglas J. Steele

Are you sure that it's the function that's returning the "Wrong number of
arguments"? Might it be how you're using the SQL? It might help to show more
of your VBA code.

Also, what are your regional settings? Might your List Separator be set to
something other than comma?
 

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