• Run timer error 2451 (97)

    Author
    Topic
    #373242

    Run timer error 2451
    While using a standard code module I keep getting run time error 2451 that the report I

    Viewing 0 reply threads
    Author
    Replies
    • #599210

      Are you sure your string sql statement is running? The statement is missing a ; at the end of the statement prior to the last “.” Since the SQL statement may not execute, access may think the table is not opened even though the report name may be correct.

      … ON Director.Code = SalesCoordinator.DirectorCode;” – add the ; after the e in Code

      HTH

      • #599211

        Well, this works:
        DoCmd.OpenReport “rptJunk”, acViewPreview, strsql
        And it doesn

        • #599267

          You answered your own question, you don’t need ,Reports!rptJunk.RecordSource = strSQL at the end of the DoCmd.OpenReport, all you need is the string name ,strSQL.
          Pat cheers

    Viewing 0 reply threads
    Reply To: Run timer error 2451 (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: