Immediate IIF() problem

  • Thread starter Thread starter Marc Miller
  • Start date Start date
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
 
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

Similar Threads

Problem With CDec Function 2
Multiple IIf's 6
Access IIF and Instr function 1
nested iif function 4
IIF function with * 7
Lab Value with iif function. 1
String in VB 6
Access Building a IIF expression in Access 0

Back
Top