Solved Mass Update Calculated fields (1 Viewer)

Eureka99

New member
Local time
Today, 14:36
Joined
Jun 29, 2020
Messages
26
I have a table with calculated fields.

I have just imported a load of data into this table.

Is there a way to force the table to calculate all the records calculated fields?
 

Ranman256

Well-known member
Local time
Today, 10:36
Joined
Apr 9, 2015
Messages
4,339
Queries make calculated fields, not tables.
the table holds the fields to do the calc.
 

Eureka99

New member
Local time
Today, 14:36
Joined
Jun 29, 2020
Messages
26
Apologies, let me rephrase, as I'm not a newbie to MS Access.

In my query structure I have this thing called a calculated field. I've attached a pic. There is no query as I havent built one for it.

I'm looking to "calculate" all these special records that say "calculated" en masse and wondered if there was a way to do it.

I'm very thankful for your reply, but it doesnt help at all.
 

Attachments

  • Calc Field.jpg
    Calc Field.jpg
    5.1 KB · Views: 128

Minty

AWF VIP
Local time
Today, 14:36
Joined
Jul 26, 2013
Messages
10,354
That is a calculated field in a table.
You can't update it as it is will be based on other fields in that table.

Normally - that field would be [FirstName] & " " & [LastName]
 

cheekybuddha

AWF VIP
Local time
Today, 14:36
Joined
Jul 21, 2014
Messages
2,237
In my query structure I have this thing called a calculated field. I've attached a pic. There is no query as I havent built one for it.
Do you actually mean: 'In my table structure ...'

This article seems to suggest (I think!) that the fields should re-calculate automatically when the underlying data is changed:
There are texts on the internet, claiming that the stored data might not be recomputed when changing the underlying expression of a calculated column. - I tried to reproduce this issue, but, with Access 2010 + 2013 updated to the current patch level, I was unable to identify any situation where that actually happened.
Is this not the case?

IMHO, there is little benefit to using calculated fields in Access tables since you can't index those fields - you are better off just creating a query with all the calculations which would re-compute automatically when the underlying data changes.
 

SHANEMAC51

Active member
Local time
Today, 17:36
Joined
Jan 28, 2022
Messages
310
In my query structure I have this thing called a calculated field.
personally, I declare such fields as normal, setting their type and size in the table

these fields are filled in in the input form, taking into account all the nuances and features

in the simplest cases, recalculation by request is possible, for example, amount=price*quantity

in other forms, this additional field is taken as is , no additional recalculation is done

if the tables are not super-large, it makes no sense to recalculate the amounts for each form/report
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:36
Joined
Feb 28, 2001
Messages
26,999
I have never used a calculated TABLE field, thought I use calculated QUERY fields all of the time. I found this reference that relates to using this relatively new Microsoft abomination:


One of the issues I found when researching for this question is that many online articles blur the definition of a calculated field, apparently conflating them with query-based computed fields. They are NOT the same, as many limitations exist on a "true" calculated table field. One of them is you can't pull data from other tables for a table-computed field. You can only use data from your current table. Another issue is that for table fields, you cannot use the full library of functions that would be available for query fields. A LOT of the article-writers treat such fields as though they were in a query, but what they suggest you can do, you really can't unless you are working in a QUERY with a JOIN of some kind.

Which is why my recommendation is to IMMEDIATELY and FOREVER ditch the table-based computation and instead create a query based on the table but that contains your computed data fields as normal query-based computations. Queries work just FINE as record sources.

Based on what research I could find, your question also appears to not make perfect sense in another way. According to a couple of articles, a computed field in a table is a VIRTUAL construct. It doesn't exist unless the table is open, and thus the field contains no data unless that table is open. So when you imply that it does not update correctly, I think that cannot actually be the case, since it doesn't exist until you open it - at which time it should be able to draw the correct, current data from its referenced data sources. Stated another way, if a calculated field isn't showing current data, then either its sources were not updated or it is malformed.
 

cheekybuddha

AWF VIP
Local time
Today, 14:36
Joined
Jul 21, 2014
Messages
2,237
From the article you (and I!) linked to:
It is very hard to find a definite statement on this in the Access documentation, but according to my own research Access does actually store the results of the calculations used in tables, instead of calculating them each time the result is required.

The problem with the Access implementation is that it serves no benefit over using a query since the calculated field can not be indexed.
 

Users who are viewing this thread

Top Bottom