'MS Access report opens but quickly closes
I have a MS Access database where the user will click a button to open a report. The report appears to be opening (white window for a few seconds; might be doing the query). But then the report just closes. It has happened to 2 users on 2 different reports, but same Database. This does not happen to me. And I'm the programmer of the database.
the "Docmd.OpenReport" is straight forward: open the report as a preview, no criteria.
I thought maybe the form is expecting a certain printer. so I printed with a printer, then deleted that printer. the problem was not replicated.
Anyone experience this? and any solutions?
Solution 1:[1]
Not sure if this helps, but I vaguely remember encountering a similar problem, and it was the result of records in the underlying query being locked while the report was being generated for preview. The command button code to open the form had On Error Resume Next; so no error was generated, the query didn’t run (due a record lock issue), and the report would just close with no error.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jeremy |
