Update Query?

  • Thread starter Thread starter Glenn Dulmage
  • Start date Start date
G

Glenn Dulmage

I have two Yes\No fields in a table: Newsletter and Extra.

I would like to have a query update the Newsletter to Yes if Extra = Yes.


--

Glenn

Glenn T. Dulmage
207 Valley Road
Chestertown, MD 21620
410-778-5166
(e-mail address removed)
 
Glenn said:
I have two Yes\No fields in a table: Newsletter and Extra.

I would like to have a query update the Newsletter to Yes if Extra
= Yes.

Here you go:

UPDATE tablename
SET Newsletter=true
WHERE Extra=true
 
BACKUP DATABASE BACKUP DATABASE
In Update To row of design view grid below Newsletter field type this --
IIF([Extra] = -1, -1, [Newsletter])
 
I have two Yes\No fields in a table: Newsletter and Extra.

I would like to have a query update the Newsletter to Yes if Extra = Yes.

Create a Query based on the table.
Put a criterion of True (or equivalently -1) under Extra.
Change the query to an Update query using the Query menu option or the
querytype tool in the toolbar.
Put -1 on the Update To line under Newsletter.

Run the query by clicking the ! icon.
 
Thanks - worked like a charm

Glenn

John W. Vinson said:
Create a Query based on the table.
Put a criterion of True (or equivalently -1) under Extra.
Change the query to an Update query using the Query menu option or the
querytype tool in the toolbar.
Put -1 on the Update To line under Newsletter.

Run the query by clicking the ! icon.
 
Back
Top