CancelUpdate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created an application in which I have serveral forms that are
launched/opened using buttons on a main form. One of my forms (most are
somewhat complex) works fine as long as open it as a stand alone without
using the button on the main form. However, if I open it using the main
form, I get this error when changing the criteria fields which control the
underlying query which in turn changes the data displayed on my form. The
error is "Cancel or CancelUpdate without AddNew or Edit". I can't figure out
where in my code or what setting could be causing this.

As I said, I don't get this error as long as I open it manually as a stand
alone form.

Can anyone help?

Thanks in advance.

Mike
 
1. Open the VBA editor window and select DEBUG>COMPILE, this will show
you the error in the vast number of instances, however I suspect the
issue is elsewhere so moving on...

2. Do a find on the keyword CANCEL and CANCELUPDATE, this will show you
each and every instance of the keywords. If you find any check the code
to confirm that you do have the neccessary AddNew or Edit statements

3. Turn off error handling TOOLS>OPTIONS>GENERAL tab and select BREAK ON
ALL ERRORS. Run the code the code SHOULD break where the issue is.

4. If THAT doesn't work, put a STOP statement in the forms onLOAD event
this will cause the execution to halt. At that point, use F8 to step
through any additional code, this should help you to figure out where
the problem is.

5. If ALL OF THAT doesn't work, find a good Irish Pub or an even better
Taverna. Have a few and then come back to it.
 
Back
Top