RunComand Canceled

J

Joyce

Here is the code I have to save a record and bring back a
new empty form for anohter entry, but now I'm getting this
error "The RunCommand Action Was Canceled" What does this
mean?

Private Sub cmdSaveNewCustomerData_Click()
On Error GoTo Err_cmdSaveNewCustomerData_Click

DoCmd.Save
DoCmd.RunCommand acCmdRecordsGoToNew

Exit_cmdSaveNewCustomerData_Click:
Exit Sub

Err_cmdSaveNewCustomerData_Click:
MsgBox Err.Description
Resume Exit_cmdSaveNewCustomerData_Click

End Sub
 
M

Michel Walsh

Hi,


It means Access cannot move to the desired record. Probably the ACTUAL
record is DIRTY and need to be saved, but CANNOT (automatically) because
some validation is not respected. Another alternative, just another one, not
necessary your case, you cannot add new record because the query supporting
the form is not updateable. In all cases, it just seems what the message
tell: you just can't, even manually, at this moment, append a new record.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top