Share via

Opening access report causes runtime error only on computers with runtime version of Access

Anonymous
2023-11-21T15:52:58+00:00

I have a database that whenever I open reports to view it causes a runtime error. But it only does this on computers that have the runtime version of Access. If it has the full version of access, even opening the database in runtime mode, it works just fine. There are no errors generated.

DoCmd.OpenReport "rptContractorUnexcusedAbsences", acViewReport, , , acDialog

That's the command I'm using. Again, full version of access shows it on screen just fine.

DoCmd.OpenReport "rptContractorUnexcusedAbsences"

That causes the report to print perfectly on the runtime computers without issue. Can anyone advise me what's up?

Microsoft 365 and Office | Access | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2023-11-21T18:09:48+00:00

    A few things I've tried so far...

    Decompile then repair database.

    Create new database, copy everything over.

    Created a load and open event with nothing in it except error checking code.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-11-21T17:33:11+00:00

    This seems to happen with all the reports, or at least every one I've tested so far. Some have code, some don't have any code or events at all. Removing acDialog does not help. It still does it with acPreview set. The report I'm using as my main test has no code or events.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-11-21T17:23:39+00:00

    Hi,

    I don't know their error handling but for the runtime and this tests you should have it in every procedure that could be involved, also in the report.

    Is there any code in the report? If so, in which events? Some are only executed when the report is displayed on the screen. Try to comment it out.

    Have you tested if it works without acDialog and in page preview, i.e. with acViewPreview?

    Servus
    Karl
    ****************
    Access Forever
    Access News
    Access DevCon
    Access-Entwickler-Konferenz AEK

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-11-21T17:11:39+00:00

    I do have error handling. It just doesn't show any numbers. It also doesn't put anything in the log file. I use the error handling from the Northwinds 2.0 database.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2023-11-21T16:37:40+00:00

    Hi,

    > a runtime error.

    Is quite unspecific. If you don't have an error handler in the procedure, then try to implement one and maybe get an error number and a meaningful error message that way.

    Servus
    Karl
    ****************
    Access Forever
    Access News
    Access DevCon
    Access-Entwickler-Konferenz AEK

    Was this answer helpful?

    0 comments No comments