Results 1 to 9 of 9
  1. #1
    joberti is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    6

    Update a table from a form that contains a calculated field

    I am new to Access and I have been trying to learn some basics as I feel there is much more things that can be done in Access than Excel. I am starting with something simple like creating the Eisenhower Matrix (importance, Urgency, Effort).
    I am trying to create a Form that pulls fields from a table and calculates a separate field based on the data. This would also be dynamic as any changes to the data will automatically calculate the field.

    tbl_Effort


    EffortID
    Rate (1-5)
    Description

    tbl_Impact
    ImpactID
    Rate (1-5)
    Definition

    tbl_Task
    TaskID
    Prioritize (calculated field Effort+Impact)
    Effort (Combo Box; Rate)
    Impact (Combo Box; Rate)

    I am trying to create a way automatically calculate the Prioritize field based on the selections in the Effort and Impact field. My understanding is that it is preferable to use Queries instead of calculation in a Table. Unfortunately, the Combo Box results are completely altered when making edits to those fields in that Form. It apparently no longer pulls the data from the table and it will not store updates to the table.

    Combo Box Preferable Results Combo Box Results after editing a field
    High 3
    Medium Medium
    Low Low

    How do I approach this?

    *Update: I attached a screenshot of the database relationship. Unfortunately, I could only reduce the file to 516 even after compiling and repairing it.
    Attached Thumbnails Attached Thumbnails Database.JPG  
    Last edited by joberti; 03-17-2020 at 11:40 PM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    joberti is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    6

    Access Database

    I had to pretty much create the database all over again and it's now smaller than 500kb. Here is the DB with some basic info. I used a Query to create the Prioritization field based on the Effort and Impact rates. I also created a form that I am intending to use to update the fields on the TaskList table. The intent is to automatically update the Prioritization field based on the Effort and Impact selection.
    Attached Files Attached Files

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Here you go. See if this is an OK approach. Rearranged table key names a bit. Established table referential integrity. The query was not updatable, so it's gone.

    Click image for larger version. 

Name:	cardio.png 
Views:	33 
Size:	19.6 KB 
ID:	41359

    Cardio-davegri-v01.zip

    Here's a second version that stores Prioritize in the junction table if you must have it stored. It uses a bit of VBA behind the form.

    Cardio-davegri-v02.zip
    Last edited by davegri; 03-20-2020 at 01:06 PM. Reason: addl

  5. #5
    joberti is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    6
    Thank you for your help. It is what I was looking for. I noticed there aren't any new tables in the 2nd version that was used as a Junction table or where the Prioritize field was added. I saw the VBA code but I only see the calculation used for the Prioritize field. Am I missing something?

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Quote Originally Posted by joberti View Post
    Thank you for your help. It is what I was looking for. I noticed there aren't any new tables in the 2nd version that was used as a Junction table or where the Prioritize field was added. I saw the VBA code but I only see the calculation used for the Prioritize field. Am I missing something?
    Not sure of the thrust of your question. If this doesn't address the issue, please clarify your needs.

    tbl_TaskList is the junction table, so there's no NEW table. The prioritize field was added to that table. Here's the relationship diagram for V2:

    Click image for larger version. 

Name:	prioritize.png 
Views:	24 
Size:	11.6 KB 
ID:	41380

  7. #7
    joberti is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    6
    Thank you for your help. It is what I was looking for. I noticed there aren't any new tables in the 2nd version that was used as a Junction table or where the Prioritize field was added. I saw the VBA code but I only see the calculation used for the Prioritize field. Am I missing something?

  8. #8
    joberti is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    6
    Thank you davegri. I now understand what was done and this is exactly what I needed. Thank you very much!

  9. #9
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    Glad that it worked for you. Good luck with the project!

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

Similar Threads

  1. Replies: 3
    Last Post: 01-08-2020, 10:11 AM
  2. Replies: 3
    Last Post: 08-07-2018, 03:28 PM
  3. Update calculated field on form
    By mommyof4kids in forum Forms
    Replies: 2
    Last Post: 08-23-2017, 07:39 AM
  4. Replies: 3
    Last Post: 02-13-2013, 10:15 AM
  5. Update table from calculated field in a form
    By BernardKane in forum Forms
    Replies: 3
    Last Post: 11-28-2006, 09:48 AM

Posting Permissions

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