Update 2: After substituting the offending code - at least what I thought it to be - from all subforms on the main form, the app now constantly asks for the main form to be saved whenever I change code in other, unrelated forms.
It seems there is a deeper problem.
I checked the System Objects (SELECT MSysObjects.Name, MSysObjects.Type FROM MSysObjects

and found more than 350 (!) Type 5, queries, all starting with '~sq_'. However, my application has only one saved query, and some of these '~sq_' are even from a totally different application (which as well has only one saved query). I did not use this other app as a starter for this one, and the other app does not have this problem.
I do have both apps open at the same time and am wondering if that could cause a problem.