calculated field in a table

G

Guest

I need to create a calculated field and I'd prefer it to be in my original
table (to ease SQL statements in datamining projects down the road). The
table is named Services and the number fields that I want to use in the
equation are Time and CrewCount. I want to create a field called PersonHours
which is Time*CrewCount. In a query I have no problem but can I do it in the
table? Thanks Ian.
 
R

Rob Parker

Hi Ian,

You cannot, and should not, do that. Include the calculated field in a
query, and for future datamining, base the SQL statements on the query,
rather than on the table.

HTH

Rob
 
G

Guest

I figured that would be the answer -- crap (but thanks). I've got the tables
in a seperate (linked) file and highly protected from misfortune but it makes
it a complete pain in the ass pivot table work. Thanks for the answer. Ian.
 
R

Rob Parker

You can view a query in PivotTable view.

Rob

Ian said:
I figured that would be the answer -- crap (but thanks). I've got the
tables
in a seperate (linked) file and highly protected from misfortune but it
makes
it a complete pain in the ass pivot table work. Thanks for the answer.
Ian.
 
J

John W. Vinson

I need to create a calculated field and I'd prefer it to be in my original
table (to ease SQL statements in datamining projects down the road). The
table is named Services and the number fields that I want to use in the
equation are Time and CrewCount. I want to create a field called PersonHours
which is Time*CrewCount. In a query I have no problem but can I do it in the
table? Thanks Ian.

Once in a GREAT while it makes some sense to store a calculated field (did I
just SAY that!??). You can do so by running an Update query updating the field
in existing records, or use code in the data entry form's BeforeUpdate event
to "push" the value into the redundant field.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top