Results 1 to 5 of 5

Calculated filed - multiplicating two numbers from dropdown fields - result wrong

  1. #1
    Jackobelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    2

    Calculated filed - multiplicating two numbers from dropdown fields - result wrong

    Hi

    I would like to multiplicate two fields and show the result in the third field but the result is wrong and I can't figure out why.
    I have two tables (Table hazard severity and table hazard probability), each containing one row of numbers (plus more information), and I need a third table C with one dropdown field from each table A and B plus one calculated field.
    The hazard severity has 5 numbers/levels to choose from and the hazard probability table has 6 numbers to choose from.
    The formula is [severity]*[probability]=risk level but if I choose the numbers the result is wrong. All three rows are set as numbers.

    Is it possible to calculate with numbers from dropdown fields? If I enter the numbers manually the formula works.





    Thanks for your help!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    20,628
    Sorry for the delay, your post was moderated and I just got home from a road trip. Your image didn't come through. I assume you're trying to do this in a query? What's the SQL of it? You certainly should be able to do the math you're describing, unless I'm misunderstanding something.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,354
    I need a third table C with one dropdown field from each table A and B plus one calculated field.
    Lookup fields and calculated fields in tables are best avoided.

    The evils of lookup fields - http://access.mvps.org/access/lookupfields.htm
    About calculated table fields - http://allenbrowne.com/casu-14.html

    While I'm at it, so are multi value fields
    About Multi Value Fields - http://www.mendipdatasystems.co.uk/multivalued-fields/4594468763

    Calculations should be done via forms and queries on the fly and not be saved as data.
    - "doesn't work" is no help. Post err msgs and where.
    - Use code tags for code/sql. Implement changes in copies of your database.

  4. #4
    Jackobelly is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    2
    I was trying to to it directly in a table but I changed it and use a query now and it works fine, thanks you!

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    20,628
    Glad you got it sorted and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-14-2015, 08:28 AM
  2. Replies: 5
    Last Post: 08-14-2014, 02:30 AM
  3. Replies: 1
    Last Post: 05-01-2013, 10:23 AM
  4. Calculated filed in Access 2007
    By fekrinejat in forum Access
    Replies: 6
    Last Post: 02-05-2013, 07:54 PM
  5. Dropdown list drops in the wrong place
    By parishpete in forum Forms
    Replies: 35
    Last Post: 11-03-2012, 08:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums