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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Query to capture AOL accounts 2
Update Query 6
Table design 6
Zip Code Count 6
Auto-Fill Addresses 2
Auto Complete in WinMail 2
Remember Password 5
Count the number of occurennces of Zip Code 2

Back
Top