I have a process that I run monthly which updates the month in several Text Boxes of various reports (month / year in the report title and the month number of the source query). This process has worked like a charm for years. However, since one or two years ago, it has OCCASIONALY happened that I've had to run this process with some minor updates, and the reports simply "do not save". I work in my local computer (database and everything is in my local SSD drive), so it's not an issue with the "network" etc. My line of code is:
The two or three times this has happened before, I have rebooted my computer (the fool-proof "when-everything-else-fails" method, right?) and, voila, then it works OK. Today, however, there was no way in hell I could make this process save the reports (the process is called for 62 different reports). I'd run the process (and I added msgboxs before and after the DoCmd line to confirm it was getting there), but the reports would not save (the "Modified date" would indeed remain as the last time I ran the process in early January). I even changed the code to:Code:DoCmd.Close acReport, ReportName, acSaveYes
So it would manually prompt me to save. Yet, to no avail, the reports would remain untouched, with the January "Modified date"Code:DoCmd.Close acReport, ReportName, acSavePrompt
Eventually I just manually updated the Text Boxes I needed to change for each of the reports (I only needed to change 4 of the reports, 9 Text Boxes in each). But my concern is, why is this happening...? Why would MS Access simply ignore the DoCmd.Close acReport, ReportName, acSaveYes command, apparently on a whim...? It's as if MS Access had a "cache" of the reports and simply refused to update them (occasionally)... If I try running this process again tomorrow, it would probably work OK... It's very frustrating, the inconsistency, and having that line of code simply "not executing", without any error or warning message of any kind... Has anyone have any similar experience with the DoCmd.Close acReport comand? Any idea of what can be happening...? Many thanks in advance for any insight on this.