?
Solved

Changing the values in a calculated field

Posted on 2011-02-22
1
Medium Priority
?
348 Views
Last Modified: 2012-05-11
Hello,

I have a MS Access DB that uses several queries.  Some of these queries have calculated fields of a currency value.  One of these calculated fields is called 'Balance Owing' - I want to take all the entries for 2009, and give them a $0.00 balance, as they're all paid off now.
But, when I tried doing that (by using an update query and using the BETWEEN command to search the date range), I got a message that said you cannot change the values of calculated fields.
0
Comment
Question by:--TripWire--
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34951727
You can only update tables.  It sounds like you are trying to update a query.
If you want a zero result in your query you either have to set the values in the table so that a zero result will be obtained , or else you have to build into the query expression a test for the year and produce a result of zero..

Balance:iif (year(mydatefield)=2009, 0, calculationHere)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question