Solved

access modifying table fields

Posted on 2013-02-05
5
295 Views
Last Modified: 2013-02-05
Hello.
Being fairly new to Access and having worked in DBASE and other database operations. I would like to know how to take two fields in one table, add them together and store the result in another field.

database table
----------------------
ex field 1 = price
value =4.44
field 2 = qty
value = 2
field 3 = result
value = (This is to be done by taking 4.44 x 2 = 8.88 and this value is stored in field3).
I know it is simple but I just have to figure out how to do this type of operation.
0
Comment
Question by:PawloA
5 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 38855691
normally you don't store calculated values to the table, you can always retrieved the correct information using a query even if the value from one of the field changed.

create a query like this

select [price],[qty], [price] * [qty] as result from tableName
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 38855692
this would be an update query:

create a query based on the table
change it to be an update query
write the top line to be the sum
[field 1]*[field2]

and select field 3 in the update to row.
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 38855696
do you want it to occur for all rows or a specific row?

is this a data entry form?  if its a form, it can be done in code on the form and update a hidden field...
0
 

Expert Comment

by:lorenjcsmith
ID: 38856073
If you are using Access 2010 this can be accomplished with a calculated field

Add a calculated field to a table
0
 
LVL 1

Author Comment

by:PawloA
ID: 38856143
I want to update certain rows based on criteria I enter in an input form which I have to find out to make.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Access Database 5 38
SQL Query help 3 24
Display field if column exists 7 30
SQL question - help with insert for missing info 5 15
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

685 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