I have a form with an unbound field that is calculated by the entries to 20+ bound fields.
When the value of the unbound field goes below a preset parameter, a message box pops up to warn the user. The user can then close the message box and continuing entering/editing data on the main form.
My problem is I cannot figure from what event to fire the code. I tried the OnChange event of the calculated field, but no luck.
Currently, I am using the MouseMove event and everything works fine, but as you would expect, the message box keeps firing.
I only need this message to appear once when the criteria is first met. I am using Nz()+Nz()... to do the addition in the calculated field and it works properly.
Current code is:
As always, any help is appreciated.
When the value of the unbound field goes below a preset parameter, a message box pops up to warn the user. The user can then close the message box and continuing entering/editing data on the main form.
My problem is I cannot figure from what event to fire the code. I tried the OnChange event of the calculated field, but no luck.
Currently, I am using the MouseMove event and everything works fine, but as you would expect, the message box keeps firing.
I only need this message to appear once when the criteria is first met. I am using Nz()+Nz()... to do the addition in the calculated field and it works properly.
Current code is:
Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If [Text25] <= [Target Cap Rate] - 0.02 Then
DoCmd.OpenForm "CAPRATEWARN_FRM", acNormal, "", "", , acNormal
End If
Cancel = True
End Sub
As always, any help is appreciated.