Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Saving a calculated value in a text box to a field in a table

Discussion in 'Information Technology' started by Intrepid_Yellow, Jul 28, 2006.

  1. Intrepid_Yellow

    Intrepid_Yellow
    Expand Collapse
    Guest

    I have the following code in the after update of four combo boxes. It
    calculates a final yes or no and displays it in a text box. I want that value
    displayed in the text box on the form to save to a field called TaskCompleted
    in a Table called ImplementationMain

    If Me.ComboAApplicable.Value = "Yes" And Me.ComboVApplicable.Value = "Yes"
    And Me.ComboARemoved.Value = "Yes" And Me.ComboVApplied.Value
    = "Yes" Then Me.ReadyStatus.Value = "Yes"
    If Me. ComboAApplicable.Value = "Yes" And Me. ComboVApplicable.Value
    = "No" And Me. ComboARemoved.Value = "Yes" Then
    Me.ReadyStatus.Value = "Yes"
    If Me. ComboAApplicable.Value = "No" And Me. ComboVApplicable.Value
    = "Yes" And Me. ComboVApplied.Value = "Yes" Then
    Me.ReadyStatus.Value
    = "Yes"
    If Me. ComboAApplicable.Value = "Yes" And Me. ComboARemoved.Value = "No"
    Then Me.ReadyStatus.Value = "No"
    If Me. ComboVApplicable.Value = "Yes" And Me. ComboVApplied.Value = "No"
    Then Me.ReadyStatus.Value = "No"
    If Me. ComboVApplicable.Value = "Unsure" Then Me.ReadyStatus.Value = "No"
    End

    ComboAApplicable saves to a field called AApplicable in table
    ImplementationMain
    ComboVApplicable saves to a field called VApplicable in table
    ImplementationMain
    ComboARemoved saves to a field called ARemoved in table ImplementationMain
    ComboVApplied saves to a field called VApplied in table ImplementationMain

    Any help would be greatly appreciated.

    Many Thanks.
     
  2. Loading...

    Similar Threads Forum Date
    World Irish lawmakers back bill on life-saving abortions Breaking News Jul 4, 2013
    Heritage Saving Gurdwaras in Pakistan History of Sikhism Feb 20, 2011
    World Naomi Bronstein Lives On - A Humanitarian Accredited With Saving 140,000 Lives Breaking News Jan 23, 2011
    USA U.S. is Saving War Memorials in Iraq Breaking News Jun 3, 2010
    Saving Punjab History of Sikhism Sep 18, 2009

  3. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    For each of your calculated Controls, create a textbox bound to the field
    into which the value should be saved. In the AfterUpdate event of each
    calculated Control, set its value into the TextBox.

    Larry Linson
    Microsoft Access MVP

    "Intrepid_Yellow" <IntrepidYellow@discussions.microsoft.com> wrote in
    message news:B2EF2D55-E96C-42ED-8CDF-DB156951D591@microsoft.com...
    >I have the following code in the after update of four combo boxes. It
    > calculates a final yes or no and displays it in a text box. I want that
    > value
    > displayed in the text box on the form to save to a field called
    > TaskCompleted
    > in a Table called ImplementationMain
    >
    > If Me.ComboAApplicable.Value = "Yes" And Me.ComboVApplicable.Value =
    > "Yes"
    > And Me.ComboARemoved.Value = "Yes" And Me.ComboVApplied.Value
    > = "Yes" Then Me.ReadyStatus.Value = "Yes"
    > If Me. ComboAApplicable.Value = "Yes" And Me. ComboVApplicable.Value
    > = "No" And Me. ComboARemoved.Value = "Yes" Then
    > Me.ReadyStatus.Value = "Yes"
    > If Me. ComboAApplicable.Value = "No" And Me. ComboVApplicable.Value
    > = "Yes" And Me. ComboVApplied.Value = "Yes" Then
    > Me.ReadyStatus.Value
    > = "Yes"
    > If Me. ComboAApplicable.Value = "Yes" And Me. ComboARemoved.Value =
    > "No"
    > Then Me.ReadyStatus.Value = "No"
    > If Me. ComboVApplicable.Value = "Yes" And Me. ComboVApplied.Value =
    > "No"
    > Then Me.ReadyStatus.Value = "No"
    > If Me. ComboVApplicable.Value = "Unsure" Then Me.ReadyStatus.Value =
    > "No"
    > End
    >
    > ComboAApplicable saves to a field called AApplicable in table
    > ImplementationMain
    > ComboVApplicable saves to a field called VApplicable in table
    > ImplementationMain
    > ComboARemoved saves to a field called ARemoved in table ImplementationMain
    > ComboVApplied saves to a field called VApplied in table ImplementationMain
    >
    > Any help would be greatly appreciated.
    >
    > Many Thanks.
     
  4. Intrepid_Yellow

    Intrepid_Yellow
    Expand Collapse
    Guest

    Thanks. I figured it out already. I just got mind block. And made something
    simple into a complicated problem. All I had to do was set the control source
    of that text box to the field and voila, calculated value stored. But thanks
    again.

    "Larry Linson" wrote:

    > For each of your calculated Controls, create a textbox bound to the field
    > into which the value should be saved. In the AfterUpdate event of each
    > calculated Control, set its value into the TextBox.
    >
    > Larry Linson
    > Microsoft Access MVP
    >
    > "Intrepid_Yellow" <IntrepidYellow@discussions.microsoft.com> wrote in
    > message news:B2EF2D55-E96C-42ED-8CDF-DB156951D591@microsoft.com...
    > >I have the following code in the after update of four combo boxes. It
    > > calculates a final yes or no and displays it in a text box. I want that
    > > value
    > > displayed in the text box on the form to save to a field called
    > > TaskCompleted
    > > in a Table called ImplementationMain
    > >
    > > If Me.ComboAApplicable.Value = "Yes" And Me.ComboVApplicable.Value =
    > > "Yes"
    > > And Me.ComboARemoved.Value = "Yes" And Me.ComboVApplied.Value
    > > = "Yes" Then Me.ReadyStatus.Value = "Yes"
    > > If Me. ComboAApplicable.Value = "Yes" And Me. ComboVApplicable.Value
    > > = "No" And Me. ComboARemoved.Value = "Yes" Then
    > > Me.ReadyStatus.Value = "Yes"
    > > If Me. ComboAApplicable.Value = "No" And Me. ComboVApplicable.Value
    > > = "Yes" And Me. ComboVApplied.Value = "Yes" Then
    > > Me.ReadyStatus.Value
    > > = "Yes"
    > > If Me. ComboAApplicable.Value = "Yes" And Me. ComboARemoved.Value =
    > > "No"
    > > Then Me.ReadyStatus.Value = "No"
    > > If Me. ComboVApplicable.Value = "Yes" And Me. ComboVApplied.Value =
    > > "No"
    > > Then Me.ReadyStatus.Value = "No"
    > > If Me. ComboVApplicable.Value = "Unsure" Then Me.ReadyStatus.Value =
    > > "No"
    > > End
    > >
    > > ComboAApplicable saves to a field called AApplicable in table
    > > ImplementationMain
    > > ComboVApplicable saves to a field called VApplicable in table
    > > ImplementationMain
    > > ComboARemoved saves to a field called ARemoved in table ImplementationMain
    > > ComboVApplied saves to a field called VApplied in table ImplementationMain
    > >
    > > Any help would be greatly appreciated.
    > >
    > > Many Thanks.

    >
    >
    >
     

Share This Page