Solved

Changing the values in a calculated field

Posted on 2011-02-22
1
293 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--
1 Comment
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now