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

Creating behind the scene calculation in Access, etc.

Status
Not open for further replies.

hliz

Technical User
Dec 19, 2008
2
US
I have added six combo boxes via six individual tables to an Access Form using the main data table. For each record, a selection must be made from each of the combo boxes.

Each table consists of three to six different text selections with a numeric value that can be made via drop-down combo box on the form. For example: Low = 1; Medium = 2; High = 3. Behind the scenes each of the table there is a constant value (different for each table) that needs to be multiplied with the "numeric value" to arrive at a fixed total that I would like to keep hidden.

An example might be if for table 1 the contant is "2", then Low would be 1 * "2" = 2; Medium would be 2 * "2" = 4; High would be 3 * "2" = 6. Each table has a different constant value, as well as different numeric values for the drop-down options.

I do not need to show the actual calculation, but I do need the total value for each calculation in order to do the next step which is to add up each total for a grand total per record. All this needs to be hidden, except for the grand total, which needs to be shown on the form.

An example for this next step would be for Record 1, the values for each table (or drop-down) are: table 1 = 1 + table 2 = 2 + table 3 = 3 + table 4 = 4 + table 5 = 5 + table 6 = 6, i.e., 1+2+3+4+5+6=21. So, the grand total of 21 would be shown on the form.

These calculations must be done for each record in the dataabase.

I hope this makes sense. I am by no stretch a programmer, and have been beating my head against a brick wall with this one.

Thanks, H
 
How do you know that the constant for table 1 is 2 ?
Why not directly store the real values for Low, Medium, ... in the table ?
Why 6 differents tables for storing same kind of data ?
Have a look here:

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I am working within a database environment that was created long before I took over its ownership. There are numerous existing queries, reports, etc., and I don't want to have to recreate these if I can help it. The database has over 6,000 records.

There are no primary keys or unique tags so as to create relationships.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top