I have a simple command button to open a form. Below is the code
Private Sub property_Click()
DoCmd.OpenForm "frmhospitalpropertyedit1"
End Sub
However when clicking on the button, I receive this error.
Run-time error '2501'
The OpenForm action was cancelled
You used a method of the DoCmd object to carry out an action in visual basic, but then clicked cancel in a dialog box.
For example, you used the close method to close a changed form, then clicked cancel in the dialog box that asks if you want to save the changes you made to the form.
I'v tried all kinds of things and can't get the error to go away. If anyone has any ideas, please help.
Private Sub property_Click()
DoCmd.OpenForm "frmhospitalpropertyedit1"
End Sub
However when clicking on the button, I receive this error.
Run-time error '2501'
The OpenForm action was cancelled
You used a method of the DoCmd object to carry out an action in visual basic, but then clicked cancel in a dialog box.
For example, you used the close method to close a changed form, then clicked cancel in the dialog box that asks if you want to save the changes you made to the form.
I'v tried all kinds of things and can't get the error to go away. If anyone has any ideas, please help.