Calculated unbound control

  • Thread starter Thread starter Paul Schumann
  • Start date Start date
P

Paul Schumann

I have a control (A) that gets its value from two other
unbound controls. The two other controls get their
values from an AfterUpdate event when the user has chosen
an item in a combobox. My problem is that the control
(A) is not being updated on the screen. It will update
only when I click on the two other controls that
determine its value.

Any help would be appreciated.

Thank you.

Paul
 
Paul,

Add a line at the end of the combobox's AfterUpdate procedure...
Me.Recalc

I think that should do the trick.
 
Thanks Steve, but it did not help. The only way I can
get a value to show for the unbound control (A) is to
click on the other two unbound controls that determine
its value. My debugging shows no value for (A) either
before or after the Me.Recalc statement.

Paul
 
Ok, Paul, I suppose there was a good chance of me getting it wrong by
pure guesswork. In that case, I think you will really need to spill the
beans, and give us some hints as to the nature of the data in the "other
two unbound controls", their relationship with the combobox, their
relationship with Control A, and the expression that determines the
value of Control A. Thanks.
 
OK, here goes. Control A is a textbox with the formula
(Control B/Control C). Controls B gets its value by
setting the RowSource to a query that sums the number of
hours for a work activity based on the name of the
employee (combobox) and an activity (constant). Control C
gets its value by setting the RowSource to a query that
sums all of the hours for the employee (combobox). I
know I am doing something wrong because when I try to see
the values for Control B and Control C before and after
the Me.Recalc statement you suggested they are empty. If
I initialize the values of Control A,B,& C I can see the
initial values in debugging, but they do not change.
What shows in the form is correct except that I need to
click on Control B & C to get Control A to calculate to
the correct result.

I hope that expalins it better. Thanks for you time and
patience.

Paul
 
Back
Top