Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Help

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
US
Can you help me?

What is wrong with this syntax? I keep getting "wrong number of arguments"

Thanks

(this is in the update field of an update query)

IIf(IsNull([tblNewData].[Business E-mail Address])) And IIf(IsNull([tblNewData].[Home E-mail])),[MemberInfo].[PrimaryEmail],IIf([tblNewData].[E-mail Preference]="Business"),[Business E-mail],IIf([tblNewData].[E-mail Preference]="Home"),[Home E-mail],[MemberInfo].[PrimaryEmail]))

 
Never mind, figured it out :)

IIf(IsNull([tblNewData].[Business E-mail Address]) And IsNull([tblNewData].[Home E-mail]),[MemberInfo].[PrimaryEmail],IIf([tblNewData].[E-mail Preference]="Business",[Business E-mail],IIf([tblNewData].[E-mail Preference]="Home",[Home E-mail],[MemberInfo].[PrimaryEmail])))

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top