create an update query

How do I update the disount field for all customers who do not already have a 
discount?  
0
Utf
4/12/2010 12:15:01 AM
access.gettingstarted 618 articles. 1 followers. Follow

2 Replies
588 Views

Similar Articles

[PageSpeed] 13

On Sun, 11 Apr 2010 17:15:01 -0700, kim <kim@discussions.microsoft.com> 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]
0
John
4/12/2010 12:34:49 AM
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?  
0
John
4/12/2010 12:34:59 AM
Reply:

Similar Artilces:

How to create identical dropdown lists in large blocks of cells
I use an excel spreadsheet to create a 4 week schedule for 20 nurses. They work a total of 13 differant shifts. (7a-11a, 7a-3p, 7a-7p, 11a-3p, 11a-7p, etc). I'm looking for a way to create identical drop down boxes with a list of the available shifts for a large group of cells. So far, I have to do each cell individually via the "Data, Validation, List" route. That's over 550 individual cells I'd have to program one at a time, which is just not gonna happen. Anybody have a faster way? Paul: You can select as many cells as you like when creating a drop-down. You c...

Query problem. Access is my nightmare.
I have a parameter query set up. It prompts me for a Ticket Number. It works fine. I want to set-up a macro or something that I can run from my switchboard. Edit Ticket Number. I set it up and it will allow any number to be put in and it will pull up all records. How do I set this up from my switch board to where someone types the Ticket Number into the parameter window and it only pulls up that record or comes back with an error message saying "record not found"? On Jan 24, 1:52=A0pm, p-rat <osupr...@yahoo.com> wrote: > I have a parameter query set up. It prompts me for a ...

Help Please! Need to set up query
I have set up a query that tells me how many mediations my office has each week. I have a field for "status" of the mediation. I'd like to be able to calculate the percentage of mediations I have in any given month has a "status" of "settled". I can't figure out how to calculate the percentage. Please help. Thanks. Field and table names sure help. In its simplest form, you seem to be asking for the following query. SELECT Abs(Sum(Status = "Settled"))/Count(MeditationDate) as PercentSettled FROM SomeTable WHERE MediationDate Between #...

Excel 2003, query doesn't refresh sometimes
Hi: I can't reproduce this but I have built a workbook using queries on different sheets that are parameterized. I used Microsoft Query and it hits an Access database. The users report sometimes it gets the numbers wrong--seems like it doesn't refresh (sometimes) when the parameter is changed. There are two parameters and they come from another worksheet. They click on "Enable Refresh" when it comes up when they open the workbook. I saw a MSFT KB that says that, if you have parameters on different worksheets, it might not refresh sometimes. However this was an issue with E...

Update stock prices
"Update prices" is not working on my investment accounts. This first happened when I created a "watch account". Nothing is now being updated: not investment indexes, not my 401(k) or 401(k)match accounts. I don't think my stock purchase plan is accorately updated either. The last accurate prices are on the 13th of Aug. If I pull up a chart, that information seems to be accurately updated. Have any of you had simular problems? What is wrong? How can I fix it? What version/bundle? When did you first install it? Do you have a bad symbol defined for an i...

create space in line chart between points, linked to pivot table
I would like to insert a space between two data points in a chart that is linked to a pivot table. In Excel versions earlier thatn 2003 I could accomplish this by clicking the seris, clicking again the area of the line for removal. Then from the top menu select format, selected data point, line, none, okay. The line connecting the consecutive data points would be removed. In Excel 2003 following the same procedure the line is removed but then shifts to the next available dat point. The only way I have found to accomplish the desired affect is to break the link with the pivot table....

Unable to insert Access queries
When trying to use ms-query to import data from an Access database, I've found that it doesn't allow me to open some of the queries (views) from access. It seems that the queries I have trouble importing have the nz() function in calculated fields of the access queries (views) (or in a sub-query). Is this simply not supported or is there a way to work around it? In the Access query, instead of Nz, use an IIF formula. For example: EstHrsCalc: IIf(IsNull([EstHrs]),0,[EstHrs]) Craig A wrote: > When trying to use ms-query to import data from an Access database, I've found that...

Code to Query SQL Server with a parameter value (entered into an Input Box), and have that value also display in a selected cell on a worksheet
I'm wondering how BEST to accomplish this. I have a EXCEL workbook which populates data to, and retrieves data from SQL Server. I currently have VBA code which effectively sends the data from the EXCEL worksheet to SQL Server tables -- no problem with this. I currently have VBA code which effectively retrieves data from SQL Server and displays that data back into the worksheet -- no problem with this either. I'm currently using a Command Button (on-click event) and the code below to query SQL Server to determine the Max Version Number and add 1 to that value. This value is t...

"Important" update keeps wanting to install again
I keep getting offered "Security Update for Windows Vista (KB981852)" even though I've already installed it. In fact, when I go to update history, it shows that the update was successfully installed 10 times since 8/12/2010. (That's every time I've turned the computer on since then!) Anybody know how to get Windows Update to stop offering this update. I've tried the "unchecking" the box but that doesn't seem to work. TIA! Gary Visit our website and do the jigsaw puzzle at www.under-1-roof.com/PuzzlePage.html "Gary" &...

In creating a COUNTIF and a COUNT to show as ie 4of10?
I'm realative new user of excel. And I'm tring to set up a file to automatically countif and count. I understand how to do one individually, but how can I get them to show as: 4 of 10 all in one cell? Assuming the 4 is the result of the COUNTIF and 10 is the result of the COUNT... =COUNTIF(...)&" of "&COUNT(...) -- Biff Microsoft Excel MVP "tobin.palmer" <tobin.palmer@discussions.microsoft.com> wrote in message news:FFE13B6A-8805-4E5B-A2A4-9FDF612900DE@microsoft.com... > I'm realative new user of excel. And I'm tr...

Trying to combine multiple records into one record in a Query
I originally cross-posted this question in microsoft.public.access.queries & microsoft.public.access.tablesdbdesign newsgroups, but did not get a response. I am new to Access, and very little knowledge about SQL. I read allot about normalization, need to know if I went to far with it with my Family table. Here is the structures for the tables I have, and of the query I want to create. Contact Table: tabContactID (Autonumber) ContactID (Create using VBA in a form) (PK) FirstName LastName etc.... Example: tabContactID ContactID FirstName LastName etc.... 0001...

Potential Solution To Startup And Update Problems
I found this in a completely unrelated site, but it worked for me. Find a file called HOSTS and open it in Notepad. You'll find that all of the lines start out with an address (such as 127.0.0.1) and then have site name. Look for any site the starts with 'MY'. You can either delete the line or (recommended) put a '# ' at the beginning of the line. Save the file and restart your machine. For me, this cleared a miriad of problems I was having, not just with MSB, but by taking care of other lines specific to Microsoft Support. If you did not create those entries in...

Creating Notes on a Closed Opportunity
Hi All, Is there away to customize Microsoft CRM 1.2 to allow users the ability to create notes for an Opportunity that is closed? I know you can do this by reopening the Opportunity, but now we’re faced with people forgetting to close the Opportunity once opened. Does anyone know of any supporting or unsupported customization that will give us this functionality? Thanks for your help You can add your custom "Add Note" button to the opportunity form through ISV.Config. On click of this button you could write code to open your custom add note form that adds note to an o...

Deleting a newly created Personal Folder (How?!)
I working with a separate problem and was messing with the Personal Folder and, after reading another post in this newsgroup, I created a second (different name) personal folder. Now I want to get rid of it, but cannot find a 'Delete'. How do I get rid of this?! Thanks Frank I found it. Right click on the folder and select Close. Sorry to bother you. ...

problems with recent windows update
I work for an internet technical support company, the last 3 days I have seen an abundance of people calling because now they are only allowed to get to certain sites. most sites that require a login give page cannot be displayed, yet other are coming up, after so many complaints with the same issue and involving different sites I think it may be due to an update, any info would be greatly appreciated. i think you'd better go back to your job working at McDonald's. itbeme wrote: > I work for an internet technical support company, the last 3 days I have > seen ...

updating spreadsheet from another spreadsheet
i need to update spreadsheet(B) from a seperate spreadsheet(A) that is on a share drive. i only want information that has been update, added, ect from (A) to populate (B). With a color coded cell (yellow) showing that the data from (A) is new when opening or manually running the macro on (B). (A) is a master spreadsheet that i need only a few of the columns data to populate (B). i am using Excel 2003 thanks also wanted to add that spreadsheet (B) will have data getting inputed on it and i don't want that over written when new or updated data is entered on spreadsheet (A). ...

Calendar updates don't work
Using Exchange 5.5, Outlook 2000, I have a user called "Corporate Calendar" with the mailbox permissions as follows: Everybody in corporation: Reviewer Admin. Asst. 1: Owner (Mailbox User and Primary NT Account in Exchange Admin) Me: Owner (Mailbox User in Exchange Admin) Admin. Asst. 2: Editor on the Calendar Problems are: "Friday, we noticed that AA#2 was able to continue to make changes to the calendar throughout the day, while AA#1 could not, even though AA#1 is the owner! However, when AA#2 opened the calendar on Monday, some changes she made Friday did not...

Cash Account Enrollment not Updating Employee Deduction Maintenanc
We are running GP 7.5 and are having the following issue: We are updating the Cash Account Enrollment for employees in HR and the system is not prompting us to update Employee Deduction Maintenance in Payroll. The system will prompt us to update Employee Deduction Maintenance in Payroll when we enter Health Insurance Enrollment in HR. Please advise. Thanks. -- Rob ...

Update
What is Happening? This message is to inform you that Microsoft will soon begin discontinuing newsgroups and transitioning users to Microsoft forums. Why? As you may know, newsgroups have existed for many years now; however, the traffic in the Microsoft newsgroups has been steadily decreasing for the past several years while customers and participants are increasingly finding solutions in the forums on Microsoft properties and third party sites. This move will unify the customer experience, centralize content, make it easier for active contributors to retain their influence, mitiga...

Can I create a custom category
I am brand new to MS Money. I am trying to setup my budget, however there are some categories that are not in the list. Can I create category for my budget? Ex. Dry Cleaning, Automobile Maintenance Depends on the Edition you are using. Money Essentials (MEss)? No. Deluxe and above? Yes. "Arrrah" <Arrrah@discussions.microsoft.com> wrote in message news:55726546-1300-417E-B588-F6BDA246D156@microsoft.com... >I am brand new to MS Money. I am trying to setup my budget, however there >are > some categories that are not in the list. Can I create category for my > b...

Chart Data Table, Data Range, etc. do not update on Chart
I have two Excel Workbooks. Workbook 1 contains the data and a line chart. Workbook 2 contains just a line chart of the same data as in Workbook 1. I copied the line chart from workbook 1 to workbook 2 using copy/paste. If the amounts change with in the existing data range then both line charts (workbook 1 & workbook 2) update fine. However, when I need to change the range of the data to include more cells only the line chart in workbook 1 is updated. The line chart in workbook two does not reflect the changes to the data range made to the line chart in workbook 1. What is the best ...

Can I create an invisible MDI child window
I need to create a MDI child window to load document then print the document to printer. There is no need to show the MDI child window. I tried to use: CFrameWnd* pFrame = (CFrameWnd*)pTemplate->CreateNewFrame(pDoc, NULL); pTemplate->InitialUpdateFrame(pFrame, pDoc, FALSE); But the result is my document is not loaded, so print will fail. I even tried: CFrameWnd* pFrame = (CFrameWnd*)pTemplate->CreateNewFrame(pDoc, NULL); pFrame->ShowWindoe(SW_HIDE); pTemplate->InitialUpdateFrame(pFrame, pDoc); But the MDI window is still visible when the document gets loaded. Is th...

MO reports serial number has already been created
I have a user who does Inventory transfers for serialized items. When a serial number he is looking for is not in the site it should be, he looks for it in some other ites. Once he's exhausted his search, he creates an MO for the item. When he's creating the MO, he tries to enter a serial number but GP reports that the serial number has already been used for this item. We can not find any instance where the serial number has been created. Has anyone seen this before? Any suggestions? Thanks. Jim ...

Create contact-list based on Active Directory attributes ?
We have Outlook 2002 sp2/sp3, Exchange 2003 sp2 and an Active Directory 2003 sp2. I wonder if it's possible to create a contact-list based on Active Directory attributes ? It could be a mailbox contact or shared maps contact Or if above are not possible, can you import an Excelsheet with phonenumbers into a contact list ? Sincerely \\Jonas B you can connect to it using LDAP. If you need specifics on how to do this, you'll need to ask in the exchange server or active directory newsgroups. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Ho...

Creating a Schedule
Hi, I would like to creat a schedule in the following format. One worksheet shows all the jobs that need to be done in a week, with days of the week allocated to each job. A second worksheet in the workbook will show each day of the week, and I would like this to automatically populate with those jobs which have that particular day of the week assigned to them. The question is, how do I do this? I wondered about using a lookup facility, but I dont think this would work. I would like each job for a day to appear on a separate line. Many thanks for any help. Will ...