Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Sum Column to table

Status
Not open for further replies.

robdunfey

Technical User
Apr 26, 2002
110
0
0
GB
Hi,

I generate a table, the change the field types to number(Ihave done this bit). Then I want to add a column to the table that averages certain columns in the table. Is this possible? If so could anyone give me some example code/tips or pointers?

Any help much appreciated.

Rob
 
It's more than a 'gut feel' - its an absolute NO NO.

If data can be derived soley from other data in the record then it has no place being stored in the table in a field of its own.
Normalisation Rules
Data Integrity
etc.. ..
 
Inspite of the above warnings, if you still want to do what you asked for, then use the

docmd.runsql "Alter Table TableName Add Column ColumnName Double;"
and
Docmd.Runsql "Update TableName Set ColumnName = ...;"

Sandip
shahs@Microdental.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top