AfterUpdate Problem

iazcac

Registered User.
Local time
Today, 22:17
Joined
Sep 15, 2004
Messages
65
I have the following in a text box in my subform footer to show the total of the remaining order items

=Sum([Quantity_Ordered]-[Quantity_Delivered])

Once this becomes 0 I want a msgbox to appear saying that the order can now go to despatch.

In the AfterUpdate of the text box above (named Sum) I have the following code

If Me.Sum = 0 Then
MsgBox "Order can now go to Despatch"
Cancel = True
End If

However this does not work, and I can not understand why! My VB is quite basic and I am stumped

Any suggestions?
 
''

Also are you putting a break point after each afterupdate and checking the calue to ensure your simple function is working right... and testing the break point when it does hit 0 to see what might be the problem?
 
There is no error message, just msgbox never appears

Think it must have something to do with the naming of the text box
 

Users who are viewing this thread

Back
Top Bottom