Reputation: 133
Is it possible to update a YES/NO field in a query from an iif statement? I cant seem to get it to work..
the end goal is geting a jobcard to show as closed as soon as the invoice date is entered
IIf(IsNull([tblManufactured]![Invoice Date]),[tblManufactured]![Job Closed]=False,[tblManufactured]![Job Closed]=True)
I've been trying to do it as an expression in a query IIf(IsNull([tblManufactured]![Invoice Date]),[Job Closed]=False,[Job Closed]=True)
[Job Closed] is the yes/no field i'm trying to autoupdate
Upvotes: 0
Views: 552
Reputation: 21379
Saving this calculated value is redundant and unnecessary. This data can be calculated when needed with expression in query, textbox, or Calculated field in table.
IIf() isn't even needed.
=Not IsNull([Invoice Date])
Saving calculated value to natural field in table requires code (macro or VBA) behind form. The trick is figuring out what event(s) to use. However, as already noted, saving is not necessary.
Upvotes: 1