Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

calculation in access

Posted on 2009-07-03
5
Medium Priority
?
442 Views
Last Modified: 2013-11-27
Hello

I have a column in access that contains a number. I would like to create another column that has the difference of that number from 30. For example if the first column contained the number 17 then the second column would contain the number 13.

thanks for your help
0
Comment
Question by:netplus21
[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
  • 3
5 Comments
 
LVL 2

Expert Comment

by:bgrandjean
ID: 24773208
Use design view on the table to create the new column then use an update query to do the calculation and update the new field.
0
 
LVL 14

Expert Comment

by:shru_0409
ID: 24773214
pls explain with proper example
0
 
LVL 77

Expert Comment

by:peter57r
ID: 24773231
If this is always the rule then you should not be storing the second value at all.
You can always calculate it whenever you need it.
If you store it there is a fair chance that the two values will get out of synch and no longer add up to 30.

Also, to do this you would have include code in your data entry form to calculate the second value and drop it into a textbox bound to the second field.

You cannot do things like this in the table design.



0
 
LVL 2

Accepted Solution

by:
bgrandjean earned 1000 total points
ID: 24773280
See attached sample query
sampleQuery.jpg
0
 
LVL 2

Expert Comment

by:bgrandjean
ID: 24773296
While the query I have shown will do what you ask I agree with Peter57r that what you are suggesting is not usually a good idea
0

Featured Post

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
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.

661 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