kosala1981
Programmer
I want to execute code, only when i click yes option of the message.
following is my code. here i try to delete a record and when i click 'Yes', the record should be deleted but the record deletes when i click 'No' as well.
Code:
If vbYes=6 Then 'both yes & no options delete records'
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If
following is my code. here i try to delete a record and when i click 'Yes', the record should be deleted but the record deletes when i click 'No' as well.
Code:
If vbYes=6 Then 'both yes & no options delete records'
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
End If