Insert data from form to table (1 Viewer)

MickCun1

Registered User.
Local time
Today, 13:55
Joined
May 21, 2018
Messages
31
Hi all,

I am just looking a bit of advice;

I have a calculated field in a form, a simple calculation that displays a value. I now want to store that value in a table which is already present in the database. I have created the column and everything in the backend and it is present in the table (the column). Am I better (or safer) creating a query or using an AfterUpdate Event and coding the insert in VBA?

Regards,
Michael :)
 

Minty

AWF VIP
Local time
Today, 18:55
Joined
Jul 26, 2013
Messages
10,371
As a general rule of thumb, it's considered a poor idea to store a value if it can be calculated from other stored values.

The reasons are many, but boil down to needing to try and capture any point where the underlying data could change, you need to update / re-store that value, which causes extra work.

You can always calculate it from the saved data.
There are some exceptions but they are few and far between.
 

Users who are viewing this thread

Top Bottom