Update Query - "Update To" - Can You Put An Expression In Here?

  • Thread starter Thread starter quirkyjoe
  • Start date Start date
Q

quirkyjoe

I have a table with one record that has special data.

If one field on that special record is true, I want to update the
record.

When I go to the update query it has the "Update To:" row. I wanted
to add IIf conditons in the fields i want to update if that one field
on that one special record is true. I only want to update the special
record so I set the criteria to just slect that record.

However, this approach does not work- It says "Operation must be an
updateable query."

How can I conduct an update query as desscribed above. The brute
force way is just to add the actual values to the update to: box but I
would rather automate it.

Thanks.
 
When I go to the update query it has the "Update To:" row. I wanted
to add IIf conditons in the fields i want to update if that one field
on that one special record is true. I only want to update the special
record so I set the criteria to just slect that record.

You can certainly use an expression in the Update To box, but the query itself
must allow updating. For instance, Totals queries or UNION queries are never
updateable. As requested, post the SQL of the query; and/or search the Help
for "updateable".

John W. Vinson [MVP]
 
Back
Top