Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009

    Unanswered: Form - Project Summary - Not Updating % based on Project Status - Access 2007

    I apologize if this question has already been answered but I have searched for three days and cannot find an answer (perhaps I'm using the wrong terminology). I am not a very experienced Access user, but I've learned and read enough to be dangerous and create a successful database (my first one by the way).

    I have created a form that lists projects from a table and part of the information listed is the "Status" of the project and the "Probability of Success". I would like the user to be able to select the status and enter a probability of success (10%, 50%, any percent value), but when two specific status options are selected ("Awarded" and "Not Awarded"), the "Probability of Success" should automatically change the user entered value to either 100% or 0%.

    The "Probability of Success" is stored in the same table that has the list of projects and is a text box set to "Number" formatted to "Percent". It needs to remain a numeric value for calculations in other forms and reports.

    Note: I have attempted to create a query that checks the "Status" and will create a column that replaces the "Probability of Success" with 100% or 0% successfully. However, when I bring the query values into the form, the user is restricted from entering a "Probability of Success" value for projects with a different status.

    I appreciate any help I can get with this issue and if any additional information is needed, please let me know.
    Last edited by Alextkexichi; 01-29-09 at 11:53.

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    You could start by using some code such as the following for the After Update event of your Status field.

    If [Status] = "Awarded" Then
      [ProbabilityOfSuccess] = 1
    ElseIf [Status] = "Not Awarded" Then
      [ProbabilityOfSuccess] = 0
    End If
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts