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

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

Thank u Stuugie.. It works

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.