MsgBox

C

CRC

I am trying to alert the user with the msgbox fucntion.
Here is what I am doing. In a number field called Counts I wan to Sum up
its values when it is =>2500 to pop up the MsgBox with Yes and No actions.
When Yes is selected it clears the counter and re-loop, when No is selected
the MsgBox closes but, will continue to alert the user until Yes is selected.

So far I created the MsgBox for the Counts in AfterUpdate [Event Procedure].
I tried the IIF statement but ran into some issues. Can anyone help? Thnx
in advance.
 
N

NG

Hi,

try:



If me.Counts >= 2500 then
if msgbox("Do you want to reset?", vbQuestion + vbYesNo, "Max of 2500
reached") = vbYes then
'enter here your reset code
end if
end if
 
L

Linq Adams via AccessMonster.com

It would help if we knew what "issues" you ran into!

The problem here, I suspect, is that Counts is a Calculated field, and when a
field is populated thru a calculation in code, the AfterUpdate event doesn't
fire!

You have to explicitly call the AfterUpdate event after triggering the
calculation.
 

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

Top