colmtourque
Registered User.
- Local time
- Today, 12:56
- Joined
- Sep 26, 2002
- Messages
- 83
I am trying to use an IIF statement in an update query. To say that if the months is on a quarter (Jan, April, July,Sept or Dec) then input a value, but if not then do nothing.
I tried to start simple with Just January and did this
UPDATE [Acct: Fixed Charges] INNER JOIN [xAcct: Fixed Charges non-Standard] ON [Acct: Fixed Charges].IDNumber = [xAcct: Fixed Charges non-Standard].[ID Number]
SET iif(format(DATE(),"mm")=1,[Acct: Fixed Charges].AgentDues = [xAcct: Fixed Charges non-Standard].[Agent Dues]);
I get a Syntax Error in Update when I try to run.
Can you not do a IIF in an update query?
Thanks in advance for the help.
I tried to start simple with Just January and did this
UPDATE [Acct: Fixed Charges] INNER JOIN [xAcct: Fixed Charges non-Standard] ON [Acct: Fixed Charges].IDNumber = [xAcct: Fixed Charges non-Standard].[ID Number]
SET iif(format(DATE(),"mm")=1,[Acct: Fixed Charges].AgentDues = [xAcct: Fixed Charges non-Standard].[Agent Dues]);
I get a Syntax Error in Update when I try to run.
Can you not do a IIF in an update query?
Thanks in advance for the help.