Function containing the wrong number of arguments

  • Thread starter Thread starter Noel
  • Start date Start date
N

Noel

I am trying to enter this expression in my query and I keep getting "The
expression you entered as a function containing the wrong number of
arguments." I am a newbie to writing expressions so I am not for sure what I
am doing wrong.

Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase.Qtrs_to_Purchase],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

Thanks
 
Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase].[Qtrs_to_Purchase],"Correct",
IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct",
IIf([Qtrs_to_Purchase Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))
 
You have three IIF statements but did not nest them.
I think this is what you want --
Error:
IIf([Qtrs to Purchase Check]=[tblServicePurchase.Qtrs_to_Purchase] OR
[Qtrs_to_Purchase Check]=[NumberofRegularCredits] OR
[Qtrs_to_Purchase Check]=[BuyBackCreditQuarters],"Correct","Mismatch")
 
This worked but I am now getting a box to Enter Paramenter Value for Qtrs to
Purchase. I have checked the spelling and it is included in the table.

Ken Snell (MVP) said:
Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase].[Qtrs_to_Purchase],"Correct",
IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct",
IIf([Qtrs_to_Purchase Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



Noel said:
I am trying to enter this expression in my query and I keep getting "The
expression you entered as a function containing the wrong number of
arguments." I am a newbie to writing expressions so I am not for sure what
I
am doing wrong.

Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase.Qtrs_to_Purchase],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase
Check]=[NumberofRegularCredits],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase
Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

Thanks
 
Try this then:

Error: IIf([Qtrs to Purchase
Check]=[Qtrs_to_Purchase],"Correct",
IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct",
IIf([Qtrs_to_Purchase Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



Noel said:
This worked but I am now getting a box to Enter Paramenter Value for Qtrs
to
Purchase. I have checked the spelling and it is included in the table.

Ken Snell (MVP) said:
Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase].[Qtrs_to_Purchase],"Correct",
IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct",
IIf([Qtrs_to_Purchase
Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



Noel said:
I am trying to enter this expression in my query and I keep getting "The
expression you entered as a function containing the wrong number of
arguments." I am a newbie to writing expressions so I am not for sure
what
I
am doing wrong.

Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase.Qtrs_to_Purchase],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase
Check]=[NumberofRegularCredits],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase
Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

Thanks
 
Need to take the wrap out of this --
Error: IIf([Qtrs to Purchase
Check]=[Qtrs_to_Purchase],"Correct",
to this --
Error: IIf([Qtrs to Purchase Check]= [Qtrs_to_Purchase],"Correct",

--
KARL DEWEY
Build a little - Test a little


Ken Snell (MVP) said:
Try this then:

Error: IIf([Qtrs to Purchase
Check]=[Qtrs_to_Purchase],"Correct",
IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct",
IIf([Qtrs_to_Purchase Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



Noel said:
This worked but I am now getting a box to Enter Paramenter Value for Qtrs
to
Purchase. I have checked the spelling and it is included in the table.

Ken Snell (MVP) said:
Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase].[Qtrs_to_Purchase],"Correct",
IIf([Qtrs_to_Purchase Check]=[NumberofRegularCredits],"Correct",
IIf([Qtrs_to_Purchase
Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/



I am trying to enter this expression in my query and I keep getting "The
expression you entered as a function containing the wrong number of
arguments." I am a newbie to writing expressions so I am not for sure
what
I
am doing wrong.

Error: IIf([Qtrs to Purchase
Check]=[tblServicePurchase.Qtrs_to_Purchase],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase
Check]=[NumberofRegularCredits],"Correct","Mismatch",
(IIf([Qtrs_to_Purchase
Check]=[BuyBackCreditQuarters],"Correct","Mismatch")))

Thanks
 
Back
Top