473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

update/replace field data

Hello,
I'm having difficulty figuring out how to update values in a certain column,
where the new information depends on the previous. Here's a further
description:
The whole database is for insurance purposes.

tbl_Property
ID Name Client Value
------------------------------
1 HouseA Client1 300,000
2 HouseB Client1 325,000
3 HouseC Client2 350,000
4 HouseD Client2 350,000
5 HouseE Client3 400,000
6 HouseF Client3 350,000
7 HouseG Client4 450,000
8 HouseH Client4 350,000
tbl_Client
Client Index
----------------
Client1 1.02
Client2 1.03
Client3 1.01
Client4 1.04

Consider the Index in tbl_Client as the inflation rate of each client's
country. At the end of each year I want to multiply the value of each house
with the corresponding index rate in order to increase the value of the
house and then put that new value into the "value" column (replace the old
value). That way I won't break any relationships between tables, which are
necessary for other calculations.
I hope all was clear. BTW, I'm quite new at using Access. Thanks in advance
for the help!
Nov 13 '05 #1
2 2242
Create a query that includes both tables and join the tables on the Client
field. You only need the Value field in the query. Change the query to an update
query. Enter the following expression where it says Update To under Value:
[Value]*[Index]

Run the query to get what you want. Be careful not to run the query more than
once!!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Dejan Pujic" <dp****@yahoo.com> wrote in message
news:40**********************@news.zen.co.uk...
Hello,
I'm having difficulty figuring out how to update values in a certain column,
where the new information depends on the previous. Here's a further
description:
The whole database is for insurance purposes.

tbl_Property
ID Name Client Value
------------------------------
1 HouseA Client1 300,000
2 HouseB Client1 325,000
3 HouseC Client2 350,000
4 HouseD Client2 350,000
5 HouseE Client3 400,000
6 HouseF Client3 350,000
7 HouseG Client4 450,000
8 HouseH Client4 350,000
tbl_Client
Client Index
----------------
Client1 1.02
Client2 1.03
Client3 1.01
Client4 1.04

Consider the Index in tbl_Client as the inflation rate of each client's
country. At the end of each year I want to multiply the value of each house
with the corresponding index rate in order to increase the value of the
house and then put that new value into the "value" column (replace the old
value). That way I won't break any relationships between tables, which are
necessary for other calculations.
I hope all was clear. BTW, I'm quite new at using Access. Thanks in advance
for the help!

Nov 13 '05 #2
thanks a lot for the help! works great :-)
"PC Datasheet" <no****@nospam.spam> wrote in message
news:yQ****************@newsread2.news.atl.earthli nk.net...
Create a query that includes both tables and join the tables on the Client
field. You only need the Value field in the query. Change the query to an update query. Enter the following expression where it says Update To under Value:
[Value]*[Index]

Run the query to get what you want. Be careful not to run the query more than once!!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Dejan Pujic" <dp****@yahoo.com> wrote in message
news:40**********************@news.zen.co.uk...
Hello,
I'm having difficulty figuring out how to update values in a certain column, where the new information depends on the previous. Here's a further
description:
The whole database is for insurance purposes.

tbl_Property
ID Name Client Value
------------------------------
1 HouseA Client1 300,000
2 HouseB Client1 325,000
3 HouseC Client2 350,000
4 HouseD Client2 350,000
5 HouseE Client3 400,000
6 HouseF Client3 350,000
7 HouseG Client4 450,000
8 HouseH Client4 350,000
tbl_Client
Client Index
----------------
Client1 1.02
Client2 1.03
Client3 1.01
Client4 1.04

Consider the Index in tbl_Client as the inflation rate of each client's
country. At the end of each year I want to multiply the value of each house with the corresponding index rate in order to increase the value of the
house and then put that new value into the "value" column (replace the old value). That way I won't break any relationships between tables, which are necessary for other calculations.
I hope all was clear. BTW, I'm quite new at using Access. Thanks in advance for the help!


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Joseph | last post by:
Hi, I've got a page which updates a record, but it fails if the text used contains an apostrophe. I understand I need to replace apostrophes with double quotes in order for it to work? I also...
0
by: Sue Adams | last post by:
I actually have two issues/questions: I have an autonumber field in an access db table that I grab and later use to update a record in another table withing the same db. The code I use to get...
12
by: jimserac | last post by:
I had previously posted this in an Access forum with negative results so will try here. Although this question specifies an Access database, I also wish to accomplish this with a large MS SQL...
9
by: joun | last post by:
Hi all, i'm using this code to insert records into an Access table from asp.net, using a stored procedure, called qry_InsertData: PARAMETERS Long, Long, Text(20), Long, DateTime; INSERT...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
0
by: JeremyW | last post by:
I have a data bound Details View control in asp.net 2.0 that formats a phone number. The 'Default Mode' for the control is set to Edit. The phone number field is a template field and I can...
1
by: geekwagon | last post by:
Not a SQL guy but can do enough to be dangerous :) Trying to update a record. We have records that have a field with data surrounded by some comment text such as *** Previous Public Solution...
3
by: Unbridled | last post by:
I am looking for the syntax to add information to information that is already in a field. I am trying to add or replace a value to a field (org_perm_id) for those that have not posted in 30 days on...
4
by: hapnendad | last post by:
In the question statement below Field names are in and variables are in (). All fields referenced are in what I have named the ‘PAR’ Table. Using MS Access 2003, I am working on a project...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.