Function containing the wrong number of arguments

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
 
K

Ken Snell \(MVP\)

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")))
 
K

KARL DEWEY

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")
 
N

Noel

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
 
K

Ken Snell \(MVP\)

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
 
K

KARL DEWEY

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
 

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