When user tried to close the form (built-in button), I prompt the user with message box whether they'd like to save or not.
My code:
If response = vbyes then
save action
Else
docmd.close
End if
If instead of the save action I just display MsgBox, it worked.
Yet, to perform the save action or close, I get an error message:
"The action cannot be carried out when processing report/form event"
Can someone help me with this?
Thanks,
Tin Tin
My code:
If response = vbyes then
save action
Else
docmd.close
End if
If instead of the save action I just display MsgBox, it worked.
Yet, to perform the save action or close, I get an error message:
"The action cannot be carried out when processing report/form event"
Can someone help me with this?
Thanks,
Tin Tin