A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

create an update query



 
 
Thread Tools Display Modes
  #1  
Old April 12th, 2010, 01:15 AM posted to microsoft.public.access.gettingstarted
Kim
external usenet poster
 
Posts: 820
Default create an update query

How do I update the disount field for all customers who do not already have a
discount?
  #2  
Old April 12th, 2010, 01:34 AM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default create an update query

On Sun, 11 Apr 2010 17:15:01 -0700, kim wrote:

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!
--

John W. Vinson [MVP]
  #3  
Old April 12th, 2010, 01:34 AM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default create an update query

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

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.