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

  • Thread starter Thread starter Guest
  • Start date Start date
G

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.
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top