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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding fields

Status
Not open for further replies.

mama16

MIS
Oct 22, 2004
125
US
I created four fields in a table, I also added a total field. How can I total the previous four fields without having to run a query? Is there a way to do so, perhaps in the design view of the table

Thanks
 
As a principle you should NEVER enter a calculated field into a table.
If for any reason any of the components change then the store field is incorrect.

If you want to show the calulated or concatenated field on a form or report then apply the code at runtime..

If you need more help let me know

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Why when I add the fields in a query and run it I get
Expr1
This is what I did

Expr1: [CT_Total]=[Statistics]![CT1stJan]+[Statistics]![CT1stFeb]+[Statistics]![CT1stMar]+[Statistics]![CT2ndApr]+[Statistics]![CT2ndMay]+[Statistics]![CT2ndJun]+[Statistics]![CT3rdJul]+[Statistics]![CT3rdAug]+[Statistics]![CT3rdSep]+[Statistics]![CT4thOct]+[Statistics]![CT4thNov]+[Statistics]![CT4thDec]
 
That's what you are suppose to do. Run that formula in a query whenever you need the total. You don't store the total in your table.

Just from this brief glimpse of your structure, your table is NOT normalized at all. If you can change your structure, you should seriously consider it, your queries are just going to get harder and harder to design to get the data you want if you don't correct the structural issues.

HTH

Leslie
 
The system is giving the expression you have entered a name - in this case Expr1

Normally you would use this feature to set an ALIAS for a field such as:
TotalCost:[Quantity] * [CostPrice]

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top