Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.
Private Sub NetAmount_AfterUpdate() On Error GoTo NetAmount_AfterUpdate_Error Dim nAmt As Long Dim nAmtTotal As Long nAmt = Format(Me.NetAmount, "Currency") nAmtTotal = FormatCurrency(Forms![frmCodingSlip]![txtMCFRemainingUS].value, 2) If nAmt > nAmtTotal Then Select Case _ MsgBox("The system is unable to process the current invoice due to the Remaining Funds of " _ & nAmtTotal & " is less than the amount of entered." _ & vbCrLf & "" _ & vbCrLf & "Please validate and adjust the amount enter that is no greater than the Remaining Funds." _ , vbOK Or vbCritical Or vbDefaultButton1, "Funds Discrepancy") Case vbOK Me.NetAmount = vbNullString Exit Sub End Select Else Me.Currency.SetFocus Me.Currency.Dropdown End If On Error GoTo 0 Exit Sub NetAmount_AfterUpdate_Error: MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure NetAmount_AfterUpdate of VBA Document Form_frmInvoiceSub" End Sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
9 Experts available now in Live!