update table

  • Thread starter Thread starter swab
  • Start date Start date
S

swab

Is possible update a table (or anther one) where some columns are type
direct by form an other 1 o 2 colums are calculate by query and dipend on
previous columns ?
Es my table new record
id data aa bb cc dd text
20 20/08/03 122,00 428,00 66,00 570,00 change
i type data, aa, bb, and text by form and cc, dd (cc:
(([table.aa]+[table.bb])*0,12) cc: (([table.aa]+[table.bb])+20) ) are
queries
can i (auto)-update directly my table or an other one with cc and dd ( all
in one id data aa bb cc dd text?
 
Is possible update a table (or anther one) where some columns are type
direct by form an other 1 o 2 colums are calculate by query and dipend on
previous columns ?
Es my table new record
id data aa bb cc dd text
20 20/08/03 122,00 428,00 66,00 570,00 change
i type data, aa, bb, and text by form and cc, dd (cc:
(([table.aa]+[table.bb])*0,12) cc: (([table.aa]+[table.bb])+20) ) are
queries
can i (auto)-update directly my table or an other one with cc and dd ( all
in one id data aa bb cc dd text?
Access is a relational database - NOT A SPREADSHEET.

Storing data which can be derived accomplishes three things:
it wastes disk space (cheap, I know); wastes time (a
multiplication is MUCH faster than a disk read); and most
important, risks data corruption. If one of the fields which
makes up your expression changes, your calculated value
stored on disk is now WRONG.

Rather than storing it, just store the base data and do the
calculation in a Query or in the Control Source of a textbox
on a Form or Report. That way the correct calculated value
will always be regenerated afresh, correctly.
 
You can do it if you perform the calculations in a form, and restrict data
entry to that form. But having said that, why bother storing the values at
all? You can always generate them as needed using a query, and you'll
eliminate a bunch of update problems.

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
Back
Top