Adding calculated field to crosstab query

A

Andrew Smith

My database contains a results table that contains four fields - ResultID
(an autonumber primary key), ReadingTypeID, BatchID and ResultValue. I use
crosstab queries to present the results in a tabular format with BatchNumber
as row heading, ReadingDescription (from a table related to ReadingTypeID)
as column heading, and LastOfResult as the value.

Quite often it will be necessary to carry out calculations using values from
two columns in the crosstab query. I had intended to use spreadsheets for
this (and may still do this). However, I think it would be better to do the
whole thing in Access if possible. So, what I would like to do is:

- allow the users to set up their own calculations by entering expressions
based on the various ReadingTypes that have been set up.
- have a system to check that the expressions are valid.
- save the expressions in a table.
- use code to create a query def that uses the existing crosstab query plus
any user defined expressions.

Given enough time, I think I could work out how to do this. However, I'd
appreciate any advice or comments that may help me to get there a bit
quicker. In particular, I don't know how to create a user friendly
expression editor, or how to check that entered expressions are valid.

Thanks

Andrew
 

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