update database using calculated expression

G

Guest

I have a Trip count field that I am calculating from 1 of 2 queries depending
on the job type. I need to use this value in reports, etc. so I have thought
of updating it into the database. Reading the forums & books, they always
advise against storing calculated values.

I'd appreciate it if someone can help me either:
- store the calculated trip count into my table or
- dynamically run query to extract the needed trip count for my report or
- calculate the trip count value when report is to be printed

I'm new to Access. Appreciate any help that you can give. Andrew Thio :)
 
J

John Vinson

I have a Trip count field that I am calculating from 1 of 2 queries depending
on the job type. I need to use this value in reports, etc. so I have thought
of updating it into the database. Reading the forums & books, they always
advise against storing calculated values.

I'd appreciate it if someone can help me either:
- store the calculated trip count into my table or
- dynamically run query to extract the needed trip count for my report or
- calculate the trip count value when report is to be printed

I'm new to Access. Appreciate any help that you can give. Andrew Thio :)

Could you give us some help, so that we can help you?

It's absolutely impossible for us to give you a "dynamically run query
to extract the needed trip count" given that nobody here has any idea
how your tables are structured, or how that trip count is to be
calculated from these tables.

Could you post the SQL of the queries which do report it, why you have
two different queries, and what criteria if any are needed to tailor
the trip count to the report?

John W. Vinson[MVP]
 
J

Joseph Meehan

Andrew said:
I have a Trip count field that I am calculating from 1 of 2 queries
depending on the job type. I need to use this value in reports, etc.
so I have thought of updating it into the database. Reading the
forums & books, they always advise against storing calculated values.

You will find that we will also.

Access is generally happier and faster at calculating values than at
looking them up.

Human nature being what it is, values have a habit of changing, do to
real changes or due to initial errors in data entry. When that happens
there is a tendency to fix the error without thinking about the now stored
calculated value which will remain in error.

I'd appreciate it if someone can help me either:
- store the calculated trip count into my table or
- dynamically run query to extract the needed trip count for my
report or
- calculate the trip count value when report is to be printed

I'm new to Access. Appreciate any help that you can give. Andrew
Thio :)

Need more information here.

As a SWAG I would suggest that you create a query based on your table.
That query could have a computed filed for the calculated value and then you
can use that query as if it were a table with a real field.
 

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