Native Access error on DELETE statement
For some crazy reason, I thought it would be easier to design this app using Access instead of from scratch usinng VB.
I am using the following code to delete records from a subform:
DoCmd.RunSQL strSQLBreakDown . The variable is an SQL delete statement.
I have written some code that returns dialog boxes to make sure the user wants to continue but Access automatically returns the following error:
You are about to delete x row(s) from the specified table. Once you click yes, you can't use Undo command to reverse the changes. Are you sure you want to delete the selected records?
The error can only be resolved the vb yes or no buttons. If the user chooses No, Access returns another error resolved by vbOKonly that prompts The RunSQL action was cancelled. Is there a better way to design this?
TIA
ML
For some crazy reason, I thought it would be easier to design this app using Access instead of from scratch usinng VB.
I am using the following code to delete records from a subform:
DoCmd.RunSQL strSQLBreakDown . The variable is an SQL delete statement.
I have written some code that returns dialog boxes to make sure the user wants to continue but Access automatically returns the following error:
You are about to delete x row(s) from the specified table. Once you click yes, you can't use Undo command to reverse the changes. Are you sure you want to delete the selected records?
The error can only be resolved the vb yes or no buttons. If the user chooses No, Access returns another error resolved by vbOKonly that prompts The RunSQL action was cancelled. Is there a better way to design this?
TIA
ML
Last edited: