I'm working with an Access 2003 (.mdb) database in Access 2007 with a MySQL backend. After some recent additions to the functionality of my application I noticed that I was repeatedly having the error "this action will reset the current code in break mode" when trying to close forms. The error message stays in an endless loop if I click "Yes" but it goes away if I click "No" only to return as soon as I try to close a form again.
After extensive troubleshooting and error trapping I have finally found what I believe to be the offending line of code--the line that changes the recordsource of a different form's subform's subform. I believe that this is the offending line of code because running this line from the Immediate pane by itself causes the error every time--no forms can be closed and the looping "break mode" error pops up. (just as with any function that includes this line). Here's the line:
Forms!frmContacts.Form!subfrmPain2.Form!subFrmListings.Form.RecordSource = "qryListingsAndProps"
What's the best way around this? I read on one forum that I can set the recordsource to SQL rather than a named query (the contents of the current query are being rewritten on-the-fly)but I tried this and it didn't work. I've been dealing with this for two days and I'm at a total loss.
Thank you in advance for your help!