0

Hello Dear All,
I have a small problem ,though seems very simple,being a newb It is difficult for me. Please Help me
I have a message box VbYesNoCancel
My code is here

If ACRS.RecordCount>0 Then
MsgBox"SALARY ALREADY CALCULATED DO YOU WANT TO RECALCULATE ?",vbYesNoCancel,"Pebble"
Else
CmbNdm.SetFocus
End If

My problem is If click "Yes" I should proceed for Recalculation, If I click "No" I should exit Sub

Edited by mavtcr

2
Contributors
3
Replies
14
Views
3 Years
Discussion Span
Last Post by Stuugie
1

Hi mavtcr, try the following and let us know how it goes:

If ACRS.RecordCount > 0 Then
        If MsgBox("SALARY ALREADY CALCULATED DO YOU WANT TO RECALCULATE ?", vbYesNoCancel, "Pebble") = vbYes Then
            'Perform your Yes calculation here
        Else
            'Prompt a message for no or do nothing
        End If
    Else
        CmbNdm.SetFocus
    End If
0

No problem mavtcr, if your issue has been resolved please don't forget to mark this thread as solved.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.