display a error msg

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

Guest

Hi! i have a subform that has a field total. and it is a total number of a
filed name values. everytime it goes above 100 i want to display a msg that
saying that it is above 100. but i tried many times and many different way.
everytime it goes over 100 it won't display. but when i go to change it, the
msg comes up. i did put the after update and before update on the filed and
the the field total. and it still display the msg late. i don't get it. when
i created a button and after it is updated and when i press the button it
will display as normal. and i tried to call the button from those events and
it still not working. help me with this.thanks!
 
At what point or points do you update the value in that field? That would be
where you would want to do the check and present the message. If you update
it in more than one place, I sugges you write a function to do the test and
display the message and call the function immediately after you update it.
 
Hi, Thelee.

Do a manual recalc before your boolean comparator in the AfterUpdate event
of the input field:

Me.Recalc
If Me![YourSummaryControl] > 100 Then
MsgBox "Your message."
End If

Sprinks
 
Back
Top