473,321 Members | 1,622 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,321 software developers and data experts.

Updating a field with a calculation with two other fields on separate tables.

Hey,

I have a problem and I'm kind of new to Access. I'm trying to update a field on one table by multiplying two fields from two separate tables. Now the problem is that every time I try an update query, I get this "Query must be updatable" and I can't make a calculated field because my operands are from other tables. Is there any way to work around this?

Thanks!
Jan 5 '12 #1
6 1465
Rabbit
12,516 Expert Mod 8TB
You shouldn't store calculations in the first place. You can just calculate it on an as needed basis.
Jan 5 '12 #2
NeoPa
32,556 Expert Mod 16PB
That's a very good point. If you have trouble understanding why then see Database Normalisation and Table Structures.

If you're interested in updatable queries then see Reasons for a Query to be Non-Updatable.
Jan 6 '12 #3
Thanks for the replies guys.

I managed to fix the problem by running two different update statements on that column.
Jan 6 '12 #4
NeoPa
32,556 Expert Mod 16PB
In that case I'm sorry to say you've missed the main point here. It sounds strange, but you'd have been better off failing to find an approached that updates any fields which are the results of calculations using data already available to you, and looking at the underlying principles instead. I rather suspect you will come across far more problems down the line with this approach than you would have if you'd paid more attention to the advice of those with the experience to know.

Good luck anyway :-)
Jan 6 '12 #5
I appreciate your advice and I would of followed it if I hadn't "solved" my issue before your messages came in. Although my solution was only for a one time update, it was pretty messy. I read those articles after though and they helped a lot. Hopefully this problem comes up again so I can take the right approach this time.

Thanks for all the help.
Jan 6 '12 #6
NeoPa
32,556 Expert Mod 16PB
To be fair - understanding how to do both will help in future. Neither will be wasted learning ;-)
Jan 6 '12 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: LRW | last post by:
I have a SQL string with a couple of JOINs that works perfectly in command prompt. I get results for all the fields selected just fine. But when I put it into a PHP page, I can't make variables(?)...
1
by: Old Timer | last post by:
I wish to type in a number in my "Code" field, for instance 1060, I then wish the number 1060 to trigger an event that will fill in the next field (township field) For instance, 1060 brings up and...
0
by: Ellen Ricca | last post by:
I have an Access db with several ODBC linked ORACLE tables. These tables have multiple-field PK's. The tables work just fine in many diff types of queries including unmatched queries that are...
10
by: John young | last post by:
I have a table which has fields "year", "odometer", and "annual".... what i currently do is enter manually data for all fields,... what i want to have happen is the annual figure to be added...
1
by: robert d via AccessMonster.com | last post by:
My application is beginning to interest prospective clients. This may be wishful thinking, but if I have a lot of clients how will I update a production backend when I need to add tables (for...
1
by: Chippy | last post by:
I am having trouble working out how to update a field on an open form with a calculation based upon calculations from other tables! For example, I have 3 tables: Diary Diary_ID: autonum,...
1
by: abprules | last post by:
Can somebody help me with this scenario? I want to update a date field when another field has a certain value entered. It is something like this: When the PDetType field ( from tlkpERegStatus...
4
by: dreaken667 | last post by:
I have a MySQL database containing 16 tables of data. Each table has a different number of columns and there are few common field names accross tables. I do have one master table with which I connect...
5
by: chazzy69 | last post by:
Ok heres what im trying to achive i am constantly updating the information in a table but know i what know if the data im replacing it with is new, i.e. whether or not i already had the data in the...
2
by: sfleming | last post by:
I am working with an ACCESS query that has a field called PR_EMP_NAME. This field contains an employee’s last name, first name and middle name. I need to separate this field into three separate...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.