If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Immediate IIF() problem
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 |
#2
|
|||
|
|||
Immediate IIF() problem
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? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Marc Miller" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|