create an update query

K

kim

How do I update the disount field for all customers who do not already have a
discount?
 
J

John W. Vinson

How do I update the disount field for all customers who do not already have a
discount?

You can see your table structure - we cannot.

Guessing that there is a field in the table Customers named Discount, you can
create an update query with a criterion

Is Null

on the discount field to find all records with blank (empty) discounts. If the
discount defaults to 0 you can use a criteron

=0

Post back if I'm misguessing your table structure!
 
J

John Spencer

Update [SomeTable]
SET Discount = .1
WHERE Discount is Null Or Discount = 0

In query design view
== Add your table
== Add the discount field
== Set the criteria to Is Null or <> 0
== Select Query: UPdate from the menu
== In the UPDATE TO "cell" under Discount field enter
.1 (for 10 percent discount)

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

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

Top