Go Back   Access World Forums > Microsoft Access Discussion > Tables

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-03-2019, 01:04 PM   #1
danrowl
Newly Registered User
 
Join Date: Jun 2019
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
danrowl is on a distinguished road
Issue with Calculation fields

Hi all,

Im putting together an Access risk assessment and I'm having problems figuring a way to calculate on the table. At the moment I have created the main Risk assessment table as well as three others; an injury; probability and; exposure table. Each one has a short text field for the name and then a number which can be used to calculate a full risk. In the main risk assessment table I have created lists so people can choose the appropriate name of each linked to each of the other tables and im hoping to have an extra field which will average the three values.

So my main issue is trying to figure out how to use a list to pick a piece of text but then in the calculation refer to the number in another field ie if i have a have a field of "daily" with a number of "3" in the list i would pick "daily" but then i want the calculation field to use the number "3" and then average it with two others in the same way. Is this possible at all or am I trying too hard?

Thanks alot!

danrowl is offline   Reply With Quote
Old 06-03-2019, 01:18 PM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 2,541
Thanks: 29
Thanked 626 Times in 609 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Issue with Calculation fields

Hi. Welcome to the forum. I think it's possible if you store the number and simply display the text. But, it's actually not the way we would recommend you do it anyway. You'd be better off doing the calculations in a query or form rather than in the table.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 06-03-2019, 01:21 PM   #3
Micron
Newly Registered User
 
Join Date: Oct 2018
Location: Ontario, Canada
Posts: 581
Thanks: 2
Thanked 114 Times in 109 Posts
Micron will become famous soon enough Micron will become famous soon enough
Re: Issue with Calculation fields

2 part answer


1-
Quote:
I'm having problems figuring a way to calculate on the table
Answer is don't store calculations. Rarely is it necessary and most of the time is ill advised.

2 - you'd need a numerical value associated with the text value. If being picked from a combo, the bound column would be number and the visible one "daily".


Back to #1 - you'd store the values and do the math on them in forms, reports or queries.
E.g. "full risk" control = Risk x Frequency x Impact, or
3 x 2 x 4 = 24 and choose the full risk assessment value that corresponds to 24 in your table. Note: 24 is not just a calculation but is associated with a risk factor text value in your table that corresponds to the form calculation.

__________________
Sometimes I just roll my eyes out loud...
Windows 10; Office 365 (Access 2016)

Last edited by Micron; 06-03-2019 at 01:26 PM. Reason: clarification
Micron is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation Issue NSAMSA General 5 10-18-2016 09:05 PM
Query Calculation issue Timothy Andrepont Queries 11 05-02-2013 12:15 PM
Stock Calculation Issue joker78 Queries 10 03-12-2012 01:44 PM
automatic calculation issue firoz.raj Excel 8 12-22-2010 04:16 AM
Calculation Issue vividor Forms 1 12-03-2002 10:11 AM




All times are GMT -8. The time now is 06:44 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World