The syntax is "UPDATE table SET field1 = (IIF (condition,valuea,valueb))
WHERE someothercondition;"
Now I'm stuck trying to use fields in the default rule - IIF works in
default rules
eg IIF(1<2,"egg","chicken")
but as soon as you include a field
eg IIF([whichfirst]>1,"egg","chicken") it spits out...
"The database engine does not recognize either the field <name> in a
validation expression, or the default value in the table <name>. (Error
3344)
Your expression refers to a field incorrectly, or to a field that does not
exist. Check to make sure the field name is valid and spelled correctly."
According to the help screens I've looked at you should be able to reference
fields, I've tried [field], "[field]", [table].[field], [table]![field] all
to no avail. It is definitely spelled correctly btw.
I've used fields in Iif in Access SQL statements fairly often without many problems. Can you post the SQL statement and the table definition?
Derek
{giving consideration to the aerodynamic properties of a PC}
Forget it. WinTel machines make better anchors than projectiles.
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak