On Fri, 21 May 2010 19:40:05 -0700, Dennis
<(E-Mail Removed)> wrote:
When you change the value of a control, its AfterUpdate event fires.
You can confirm that by setting a breakpoint in the procedure.
The only reason I can think of this would not occur is if somehow
(e.g. cut control, paste it) the event procedure is "disconnected"
from the event. Design the form, select the control, select the
properties window > Events tab, and click on the ... button to the
right of the event to reestablish the link.
-Tom.
Microsoft Access MVP
>Hi,
>
>I'm running Access via XP Office Pro under Windows 7.
>
>Background -------------------
>
>We are working on creating a cash receipt form. Checks are group into
>"batches" of 20 checks. Someone adds up the checks using a calcuator. The
>total from the calculator is called the "batch control total".
>
>The cash receipts form has a form and a sub-form. The allows the user to
>enter the batch number, batch date, control total amount (from manually run
>caculator tape), and batch comment. The sub-form enables the user to enter
>the individual checks. The control total amount's text control is called
>txtCtlTotal.
>
>In the footing of the sub-form, I calculate the total of the checks entered
>by using a text box control called txtFFTotCash. The control's source is =
>Sum(ChkAmt)
>
>On the form, I also have two additional text box controls that were not
>mentioned above. The first one is call txtBatchTot and its source is the
>txtFFTotCash control in the sub-form's footer. The second control is called
>txtDif and its source is = txtCtlTotal txtBatchTot.
>
>The second control indicates if the batch is in balance or not. If the
>batch control total (txtCtlTotal) total of checks entered (txtFFTotCash or
>txtBatchTot) = 0, then the batch is in balance. If the amount is other than
>zero, then the batch is out of balance.
>
>All of the above works just fine. Here is my question.
>
>
>
>Question ---------------------------------------------------------
>
>As long as the txtCtlTotal is NOT zero, I was to display the message Out of
>Balance. When the txtCtlTotal is set to zero, then I was the display to
>disappear.
>
>Ive put code in txtDifs After Update, On Dirty, an On Change events to
>make the message disappear (visible = False), but the events are not
>triggered when the value of txtDif changes.
>
>How do I get the Out of Balance message to disappear when the value of
>txtDif changes to zero?
>
>Thanks,
>
>Dennis
|